public final class MethodData extends Object
Modifier and Type | Class and Description |
---|---|
static interface |
MethodData.Results
Annotation objects implement this Results interface.
|
Constructor and Description |
---|
MethodData(Decoder d,
int access,
String classType,
String name,
String signature)
Gather the information for a method after it has been decoded.
|
MethodData(int access,
String classType,
String name,
String signature,
IInstruction[] instructions,
ExceptionHandler[][] handlers,
int[] instructionsToBytecodes)
Gather the information for a method "from scratch".
|
Modifier and Type | Method and Description |
---|---|
int |
getAccess() |
String |
getClassType() |
ExceptionHandler[][] |
getHandlers() |
boolean |
getHasChanged() |
MethodData.Results |
getInfo(Object key)
Get the annotation for the given key.
|
IInstruction[] |
getInstructions() |
int[] |
getInstructionsToBytecodes() |
boolean |
getIsStatic() |
boolean |
getIsSynchronized() |
String |
getName() |
String |
getSignature() |
static MethodData |
makeWithDefaultHandlersAndInstToBytecodes(int access,
String classType,
String name,
String signature,
IInstruction[] instructions)
Create information for a method, with no exception handlers and a dummy mapping of instructions to original bytecodes.
|
void |
putInfo(Object key,
MethodData.Results value)
Set the annotation for the given key.
|
void |
setHasChanged() |
String |
toString() |
public MethodData(int access, String classType, String name, String signature, IInstruction[] instructions, ExceptionHandler[][] handlers, int[] instructionsToBytecodes)
access
- the access flagsclassType
- the class in which the method is defined, in JVM type format (e.g., Ljava/lang/Object;)name
- the method namesignature
- the method signature, in JVM type format (e.g., (ILjava/lang/Object;)V)instructions
- the instructions making up the methodhandlers
- a list of exception handlers for each instructioninstructionsToBytecodes
- a map stating, for each instruction, the offset of the original bytecode instruction(s) giving
rise to this instructionpublic MethodData(Decoder d, int access, String classType, String name, String signature) throws NullPointerException
d
- the decoder which has decoded the methodaccess
- the access flagsclassType
- the class in which the method is defined, in JVM type format (e.g., Ljava/lang/Object;)name
- the method namesignature
- the method signature, in JVM type format (e.g., (ILjava/lang/Object;)V)NullPointerException
- if d is nullpublic static MethodData makeWithDefaultHandlersAndInstToBytecodes(int access, String classType, String name, String signature, IInstruction[] instructions)
access
- the access flagsclassType
- the class in which the method is defined, in JVM type format (e.g., Ljava/lang/Object;)name
- the method namesignature
- the method signature, in JVM type format (e.g., (ILjava/lang/Object;)V)instructions
- the instructions making up the methodpublic void setHasChanged()
public String getSignature()
public String getName()
public int getAccess()
public String getClassType()
public boolean getIsStatic()
public boolean getIsSynchronized()
public ExceptionHandler[][] getHandlers()
public IInstruction[] getInstructions()
public int[] getInstructionsToBytecodes()
public MethodData.Results getInfo(Object key)
public void putInfo(Object key, MethodData.Results value)
public boolean getHasChanged()