public abstract class AMethodCodeAnalyzer extends java.lang.Object implements IMethodCodeAnalyzer
Modifier and Type | Field and Description |
---|---|
protected static int |
NOT_PRESENT |
Constructor and Description |
---|
AMethodCodeAnalyzer() |
Modifier and Type | Method and Description |
---|---|
protected void |
analyzeMethod(org.apache.bcel.classfile.Method method,
InstructionDetector instructionDetector,
InstructionHandler instructionHandler) |
protected int |
detectPoolIndexOfMethod()
Subclasses should override this to return the correct pool index
of the method of interest.
|
protected FileUtil |
futil() |
protected org.apache.bcel.classfile.ConstantPool |
getConstantPool() |
protected java.lang.String |
getConstantString(org.apache.bcel.generic.CPInstruction instruction)
Returns the constant UTF8 String the given instruction is pointing to.
|
protected org.apache.bcel.classfile.JavaClass |
getJavaClass() |
protected int |
getPoolIndexOfMethod() |
void |
init(org.apache.bcel.classfile.JavaClass classToAnalyze)
Resets and initializes the analyzer for a new class.
|
protected boolean |
isInvokingMethodOfInterest(org.apache.bcel.generic.InvokeInstruction invokeInstruction) |
boolean |
isRelevant()
Returns true if this method code analyzer is relevant
for the underlying Java class.
|
protected void |
setJavaClass(org.apache.bcel.classfile.JavaClass javaClass) |
protected void |
setPoolIndexOfMethod(int poolIndexOfMethod) |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
analyzeMethod
protected static final int NOT_PRESENT
public void init(org.apache.bcel.classfile.JavaClass classToAnalyze)
IMethodCodeAnalyzer
init
in interface IMethodCodeAnalyzer
public boolean isRelevant()
IMethodCodeAnalyzer
isRelevant
in interface IMethodCodeAnalyzer
protected void analyzeMethod(org.apache.bcel.classfile.Method method, InstructionDetector instructionDetector, InstructionHandler instructionHandler)
protected int detectPoolIndexOfMethod()
protected boolean isInvokingMethodOfInterest(org.apache.bcel.generic.InvokeInstruction invokeInstruction)
protected java.lang.String getConstantString(org.apache.bcel.generic.CPInstruction instruction)
instruction
- The instruction pointing to a string in the constant pool.protected org.apache.bcel.classfile.ConstantPool getConstantPool()
protected org.apache.bcel.classfile.JavaClass getJavaClass()
protected void setJavaClass(org.apache.bcel.classfile.JavaClass javaClass)
protected int getPoolIndexOfMethod()
protected void setPoolIndexOfMethod(int poolIndexOfMethod)
protected FileUtil futil()