Basic annotation tooling for RockSack to generate the necessary fields and methods for
storage and retrieval under the java.lang.Comparable interface as used throughout the language.
The ordering of the keys is defined here as by the annotation order field: j,i, and l. We
demonstrate method and field access and generate compareTo method and Externalizable interface
implementation with SerialUID. We also show how to wrap a custom object to give Comparable
functionality to any class. No modifications will affect the operation of the original class.
The original class will be backed up as TestTooling1.bak before modification.
CompareAndSerialize
annotation to designate the class as toolable. The
ComparisonOrderField
and
ComparisonOrderMethod
.
ClassTool