|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjist.runtime.ClassTraversal.Empty
jist.swans.Rewriter.ModifyTypeTraversal
public static class Rewriter.ModifyTypeTraversal
Class traversal that substitutes types in all the common places.
Field Summary | |
---|---|
private org.apache.bcel.generic.InstructionFactory |
ifc
class instruction factory. |
private Rewriter.ModifyTypeInfo[] |
modifications
type modification info. |
Constructor Summary | |
---|---|
Rewriter.ModifyTypeTraversal(Rewriter.ModifyTypeInfo[] modifications)
Create a type-modifying traversal object. |
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.FieldGen |
doField(org.apache.bcel.generic.ClassGen cg,
org.apache.bcel.generic.FieldGen fg)
Upcall to process field. |
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 . |
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. |
private boolean |
isIgnored(java.lang.String classname)
|
private boolean |
shouldAddJistPostInit(java.lang.String oldName)
|
private boolean |
shouldTransformName(java.lang.String n)
|
private boolean |
shouldTransformType(org.apache.bcel.generic.Type t)
|
private boolean |
shouldTransformTypes(org.apache.bcel.generic.Type[] t)
|
private java.lang.String |
transformName(java.lang.String n)
Replace type by string. |
private org.apache.bcel.generic.Type |
transformType(org.apache.bcel.generic.Type t)
Replace BCEL type. |
private org.apache.bcel.generic.Type[] |
transformTypes(org.apache.bcel.generic.Type[] t)
Replace BCEL type array. |
Methods inherited from class jist.runtime.ClassTraversal.Empty |
---|
doClassPost, 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.ModifyTypeInfo[] modifications
Constructor Detail |
---|
public Rewriter.ModifyTypeTraversal(Rewriter.ModifyTypeInfo[] modifications)
oldName
- name of old typenewName
- name of new typeaddJistPostInit
- whether to add a _jistPostInit call
after an initializer call is modified.Method Detail |
---|
private org.apache.bcel.generic.Type transformType(org.apache.bcel.generic.Type t)
t
- type to replace
private boolean shouldTransformType(org.apache.bcel.generic.Type t)
private org.apache.bcel.generic.Type[] transformTypes(org.apache.bcel.generic.Type[] t)
t
- type array to substitute
private boolean shouldTransformTypes(org.apache.bcel.generic.Type[] t)
private java.lang.String transformName(java.lang.String n)
n
- type string to substitute
private boolean shouldTransformName(java.lang.String n)
private boolean isIgnored(java.lang.String classname)
private boolean shouldAddJistPostInit(java.lang.String oldName)
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.FieldGen doField(org.apache.bcel.generic.ClassGen cg, org.apache.bcel.generic.FieldGen fg)
doField
in interface ClassTraversal.Visitor
doField
in class ClassTraversal.Empty
cg
- BCEL class generator objectfg
- BCEL field generator object to process
public org.apache.bcel.generic.MethodGen doMethod(org.apache.bcel.generic.ClassGen cg, org.apache.bcel.generic.MethodGen mg)
doMethod
in interface ClassTraversal.Visitor
doMethod
in class ClassTraversal.Empty
cg
- BCEL class generator objectmg
- BCEL method generator object to process
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)
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
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |