: eval 'exec perl -w -S `echo $0 | sed "s/.*\///" ` ${1+"$@"}' if 0; @a=@ARGV; @flags=grep(/^-/,@a); @other=(); @other=grep(!/^-/,@a); if ( grep( /^-h(elp)?$/,@flags) || scalar(@other) != 1) { $scriptName = $0; $scriptName =~ s%^.*/%%; print <<"END"; Usage: $scriptName [-h -help] Class Print out a prototype of a new java class that implements Serializable. END exit;} $rN="\n"; $rN="\n" if ( ! -d "/var" ); $Class=$a[0]; print <<"END"; import java.io.*; public class $Class implements java.io.Serializable { private static final long serialVersionUID = 1L; // Serializable. // Method must have this exact signature and remain private. // Do not worry about members of super- or subclasses. private void writeObject(java.io.ObjectOutputStream out) throws IOException { out.defaultWriteObject(); // Default behavior. Not required. // out.writeObject(_memberObject); // out.writeInt(_memberInt); } // Serializable // Method must have this exact signature and remain private. private void readObject(java.io.ObjectInputStream in) throws IOException, ClassNotFoundException { in.defaultReadObject(); // Default behavior. Not required. // _memberObject = (ObjectType) in.readObject(); // _memberInt = out.readInt(); } } END