This is a Javassist program which produce a new class representing
vectors of a given type. For example,
import java.util.Vector by sample.vector.VectorAssistant(int)
requests the Javassist preprocessor to substitute the following
lines for the original import declaration:
import java.util.Vector;
import sample.vector.intVector;
The Javassist preprocessor calls VectorAssistant.assist()
and produces class intVector equivalent to:
package sample.vector;
public class intVector extends Vector {
pubilc void add(int value) {
addElement(new Integer(value));
}
public int at(int index) {
return elementAt(index).intValue();
}
}
VectorAssistant.assist() uses
sample.vector.Sample and sample.vector.Sample2
as a template to produce the methods add() and
at() .
|