|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectataspectj.AtAspectjComponent
ataspectj.instrumentation.InstrumentationFactory
public class InstrumentationFactory
Field Summary |
---|
Fields inherited from class ataspectj.AtAspectjComponent |
---|
barrier, CODEPRINT, DEBUG, VERBOSE |
Constructor Summary | |
---|---|
InstrumentationFactory()
|
Method Summary | |
---|---|
static org.apache.bcel.classfile.Method |
addCurrentJump(org.apache.bcel.generic.MethodGen mg,
int startPc,
int endPc,
org.apache.bcel.generic.ConstantPoolGen cg)
It adds a jump instruction before the startPC that target the endPC. |
static org.apache.bcel.classfile.Method |
addNewInvokeInstructionList(org.apache.bcel.generic.MethodGen mg,
int endPc,
org.apache.bcel.generic.InstructionList invokeList)
It adds the invoke instructions after the endPc (the target of the added jump). |
protected static byte[] |
addNOPByte(byte[] oldBytecode)
It adds a NOP byte at the end of the array. |
static org.apache.bcel.generic.MethodGen |
createMethodGen(int flags,
java.lang.String methodName,
java.lang.String className,
IndexRepository[] params,
org.apache.bcel.generic.InstructionList il,
org.apache.bcel.generic.ConstantPoolGen cg)
It creates the MethodGen for the new extracted Method. |
static void |
stampaInstructionHandles(org.apache.bcel.generic.InstructionList il)
It prints the InstrcionsHandles of the given instruction list. |
static void |
stampaInstructions(byte[] bc)
It prints the Instrcions of the given bytecode |
static void |
updateAnnotationBoundaries(org.apache.bcel.classfile.Attribute[] all,
int startPc,
int endPc,
int offset)
It updates the boundaries (startPC and endPC) icrementing them by the offset. |
Methods inherited from class ataspectj.AtAspectjComponent |
---|
done |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public InstrumentationFactory()
Method Detail |
---|
protected static byte[] addNOPByte(byte[] oldBytecode)
oldBytecode
- the original bytecode
public static org.apache.bcel.classfile.Method addCurrentJump(org.apache.bcel.generic.MethodGen mg, int startPc, int endPc, org.apache.bcel.generic.ConstantPoolGen cg)
mg
- the MethodGen.startPc
- the startPC, also the index where insert the jump.endPc
- the endPC, also the taget.cg
- the ConstantPoolGen
public static void updateAnnotationBoundaries(org.apache.bcel.classfile.Attribute[] all, int startPc, int endPc, int offset)
all
- All tThe Attribute.startPc
- The startPCendPc
- The endPc.offset
- The offset to use.public static org.apache.bcel.generic.MethodGen createMethodGen(int flags, java.lang.String methodName, java.lang.String className, IndexRepository[] params, org.apache.bcel.generic.InstructionList il, org.apache.bcel.generic.ConstantPoolGen cg)
flags
- The flags inherited by the original method.methodName
- The new method name.className
- The Class of method.params
- The parameters of the new method.il
- The instruction list of the new method.cg
- The costant pool gen
public static org.apache.bcel.classfile.Method addNewInvokeInstructionList(org.apache.bcel.generic.MethodGen mg, int endPc, org.apache.bcel.generic.InstructionList invokeList)
mg
- The MethodGen to modify.endPc
- The endPc where add the invoke instrucions.invokeList
- The invoke instructions.
public static void stampaInstructions(byte[] bc)
bc
- the bytecode to print.public static void stampaInstructionHandles(org.apache.bcel.generic.InstructionList il)
il
- The instruction list to print.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |