I find it a pain when writing java code to type out 20 or 30 get set methods (since you sould use get and set in java instead of referring straight to the variable) so i wrote a perl scrpt that does this for me.
Here it is.
#!/usr/bin/perl[Editor's note: This hint has not been tested on my machine, primarily because my skill set does not extend to Java and perl!]
($a, $t) = @ARGV;
unless ($a)
{
print "Nameov integer: ";
chomp($a = <STDIN>);
print "Type of integer:";
chomp($t = <STDIN>);
$b = ucfirst($a);
}
print "\npublic $t get$b()\n{\n";
print "\t return $a;\n}\n\n";
print "pubic void set$b($t val)\n{\n";
print "\t $a = val;\n}\n\n";
Mac OS X Hints
http://hints.macworld.com/article.php?story=20020805083012902