|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjist.runtime.ClassTraversal
public class ClassTraversal
Facilitates traversal and and modification of a BCEL JavaClass structure. The traversal does not visit all elements of the class, only the ones that are important for JiST. Specifically, it visits (with upcalls) the class, fields, method and each instruction.
Nested Class Summary | |
---|---|
static class |
ClassTraversal.Empty
Provides a default (empty) implementation of the Visitor . |
static interface |
ClassTraversal.Visitor
ClassTraversal upcall interface. |
Field Summary | |
---|---|
private ClassTraversal.Visitor |
jcti
Traversal upcall instance. |
Constructor Summary | |
---|---|
ClassTraversal(ClassTraversal.Visitor jcti)
Create a new traversal object and initialize it with given traversal upcall. |
Method Summary | |
---|---|
org.apache.bcel.classfile.JavaClass |
processClass(org.apache.bcel.classfile.JavaClass jc)
Accept a class for traversal and processing, and return the resulting (possibly modified) class. |
protected org.apache.bcel.generic.ClassGen |
processClassGen(org.apache.bcel.generic.ClassGen cg)
Traverse and process a class. |
protected org.apache.bcel.generic.FieldGen |
processFieldGen(org.apache.bcel.generic.ClassGen cg,
org.apache.bcel.generic.FieldGen fg)
Traverse and process a field. |
protected void |
processInstruction(org.apache.bcel.generic.ClassGen cg,
org.apache.bcel.generic.MethodGen mg,
org.apache.bcel.generic.InstructionHandle[] ihs,
int i)
Traverse and process an instruction. |
protected org.apache.bcel.generic.MethodGen |
processMethodGen(org.apache.bcel.generic.ClassGen cg,
org.apache.bcel.generic.MethodGen mg)
Traverse and process a method. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
private ClassTraversal.Visitor jcti
Constructor Detail |
---|
public ClassTraversal(ClassTraversal.Visitor jcti)
jcti
- object to receive upcalls during traversalMethod Detail |
---|
public org.apache.bcel.classfile.JavaClass processClass(org.apache.bcel.classfile.JavaClass jc) throws java.lang.ClassNotFoundException
jc
- BCEL JavaClass structure to traverse and process
java.lang.ClassNotFoundException
protected org.apache.bcel.generic.ClassGen processClassGen(org.apache.bcel.generic.ClassGen cg) throws java.lang.ClassNotFoundException
cg
- BCEL class generator object
java.lang.ClassNotFoundException
protected org.apache.bcel.generic.FieldGen processFieldGen(org.apache.bcel.generic.ClassGen cg, org.apache.bcel.generic.FieldGen fg) throws java.lang.ClassNotFoundException
cg
- BCEL class generator objectfg
- BCEL field generator object
java.lang.ClassNotFoundException
protected org.apache.bcel.generic.MethodGen processMethodGen(org.apache.bcel.generic.ClassGen cg, org.apache.bcel.generic.MethodGen mg) throws java.lang.ClassNotFoundException
cg
- BCEL class generator objectmg
- BCEL method generator object
java.lang.ClassNotFoundException
protected void processInstruction(org.apache.bcel.generic.ClassGen cg, org.apache.bcel.generic.MethodGen mg, org.apache.bcel.generic.InstructionHandle[] ihs, int i) throws java.lang.ClassNotFoundException
cg
- BCEL class generator objectmg
- BCEL field generator objectihs
- array of BCEL instruction handlesi
- instruction handle index
java.lang.ClassNotFoundException
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |