|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjist.runtime.ClassTraversal.Empty
jist.runtime.RewriterTraversalRemoveFieldAccess
class RewriterTraversalRemoveFieldAccess
Traversal object that ensures all entity field access operations are
converted to method invocations. The traversal replaces all
getfield
, getstatic
, putfield
and
putstatic
instructions into the appropriate method invocations.
Field Summary | |
---|---|
private org.apache.bcel.generic.InstructionFactory |
ifc
class instruction factory. |
private Rewriter |
rewriter
primary rewriter. |
Constructor Summary | |
---|---|
RewriterTraversalRemoveFieldAccess(Rewriter rewriter)
Create rewriter object to convert all remote field accesses to method accesses. |
Method Summary | |
---|---|
org.apache.bcel.generic.ClassGen |
doClass(org.apache.bcel.generic.ClassGen cg)
Upcall to process class before field and method processing. |
void |
doInstruction(org.apache.bcel.generic.ClassGen cg,
org.apache.bcel.generic.MethodGen mg,
org.apache.bcel.generic.InstructionHandle ih,
org.apache.bcel.generic.Instruction inst)
Upcall to process instruction. Note that instructions can be inserted and deleted directly using the BCEL API, and therefore this method returns void . |
private boolean |
isLocalNonPublicFieldAccess(org.apache.bcel.generic.ClassGen cg,
org.apache.bcel.generic.ConstantPoolGen cpg,
org.apache.bcel.generic.FieldInstruction inst)
Determine whether instruction is local field access. |
Methods inherited from class jist.runtime.ClassTraversal.Empty |
---|
doClassPost, doField, doMethod, doMethodPost |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
private org.apache.bcel.generic.InstructionFactory ifc
private Rewriter rewriter
Constructor Detail |
---|
public RewriterTraversalRemoveFieldAccess(Rewriter rewriter)
rewriter
- reference to primary rewriterMethod Detail |
---|
public org.apache.bcel.generic.ClassGen doClass(org.apache.bcel.generic.ClassGen cg)
doClass
in interface ClassTraversal.Visitor
doClass
in class ClassTraversal.Empty
cg
- BCEL class generator object to process
private boolean isLocalNonPublicFieldAccess(org.apache.bcel.generic.ClassGen cg, org.apache.bcel.generic.ConstantPoolGen cpg, org.apache.bcel.generic.FieldInstruction inst)
cg
- class objectcpg
- class constant poolinst
- instruction to test
public void doInstruction(org.apache.bcel.generic.ClassGen cg, org.apache.bcel.generic.MethodGen mg, org.apache.bcel.generic.InstructionHandle ih, org.apache.bcel.generic.Instruction inst) throws java.lang.ClassNotFoundException
void
.
doInstruction
in interface ClassTraversal.Visitor
doInstruction
in class ClassTraversal.Empty
cg
- BCEL class generator objectmg
- BCEL method generator objectih
- BCEL instruction handle object to processinst
- BCEL instruction object to process
java.lang.ClassNotFoundException
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |