|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjist.runtime.ClassTraversal.Empty
jist.runtime.RewriterTraversalAddEntityMethodStubs
class RewriterTraversalAddEntityMethodStubs
Traversal object that adds fields in an entity object that store method
references. These method stubs greatly improve the speed of method
invocation, since reflection is not performed each time. This traversal also
inserts code within the class initializer (creating it if no such method
exists) to call the generic method stub initialization method
(Rewriter.initializeMethodStubs
). This method uses reflection
(at load time only) to initialize the stub fields.
Rewriter.initializeMethodStubs(java.lang.String)
Field Summary | |
---|---|
private org.apache.bcel.generic.MethodGen |
clinit
class initializer. |
private org.apache.bcel.generic.InstructionFactory |
ifc
class instruction factory. |
private Rewriter |
rewriter
primary rewriter. |
Constructor Summary | |
---|---|
RewriterTraversalAddEntityMethodStubs(Rewriter rewriter)
Create rewriter object that add entity method stubs. |
Method Summary | |
---|---|
org.apache.bcel.generic.ClassGen |
doClass(org.apache.bcel.generic.ClassGen cg)
Upcall to process class before field and method processing. |
org.apache.bcel.generic.ClassGen |
doClassPost(org.apache.bcel.generic.ClassGen cg)
Upcall to process class after field and method processing. |
org.apache.bcel.generic.MethodGen |
doMethod(org.apache.bcel.generic.ClassGen cg,
org.apache.bcel.generic.MethodGen mg)
Upcall to process method before instruction processing. |
Methods inherited from class jist.runtime.ClassTraversal.Empty |
---|
doField, doInstruction, 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
private org.apache.bcel.generic.MethodGen clinit
Constructor Detail |
---|
public RewriterTraversalAddEntityMethodStubs(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
public org.apache.bcel.generic.MethodGen doMethod(org.apache.bcel.generic.ClassGen cg, org.apache.bcel.generic.MethodGen mg) throws java.lang.ClassNotFoundException
doMethod
in interface ClassTraversal.Visitor
doMethod
in class ClassTraversal.Empty
cg
- BCEL class generator objectmg
- BCEL method generator object to process
java.lang.ClassNotFoundException
public org.apache.bcel.generic.ClassGen doClassPost(org.apache.bcel.generic.ClassGen cg)
doClassPost
in interface ClassTraversal.Visitor
doClassPost
in class ClassTraversal.Empty
cg
- BCEL class generator object to process
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |