public class DexIMethod extends Object implements IBytecodeMethod
IMethod.SourcePositionContextItem.Value<T>| Modifier and Type | Field and Description |
|---|---|
protected InstructionArray |
instructions |
protected DexIClass |
myClass
The declaring class for this method.
|
| Constructor and Description |
|---|
DexIMethod(org.jf.dexlib.ClassDataItem.EncodedMethod encodedMethod,
DexIClass klass) |
| Modifier and Type | Method and Description |
|---|---|
boolean |
equals(Object obj) |
int |
getAddressFromIndex(int index) |
Collection<Annotation> |
getAnnotations()
Get the annotations on this member, if any
|
Collection<Annotation> |
getAnnotations(boolean runtimeInvisible) |
int |
getBytecodeIndex(int i) |
Collection<CallSiteReference> |
getCallSites()
there
|
IClassHierarchy |
getClassHierarchy() |
TypeReference[] |
getDeclaredExceptions() |
IClass |
getDeclaringClass()
Return the object that represents the declaring class
for this member.
|
Descriptor |
getDescriptor()
something like: (IILjava.lang.String;SLjava.sql.Date;)Ljava.lang.Integer;
|
Instruction[] |
getDexInstructions() |
int |
getExceptionReg() |
ExceptionHandler[][] |
getHandlers() |
IndirectionData |
getIndirectionData() |
Instruction |
getInstructionFromIndex(int instructionIndex) |
int |
getInstructionIndex(int bytecodeindex) |
IInstruction[] |
getInstructions() |
int |
getLineNumber(int bcIndex) |
String |
getLocalVariableName(int bcIndex,
int localNumber) |
int |
getMaxLocals()
XXX not fully about the + 2.
|
int |
getMaxStackHeight() |
Atom |
getName() |
int |
getNumberOfParameterRegisters() |
int |
getNumberOfParameters()
Method getNumberOfParameters.
|
Collection<Annotation>[] |
getParameterAnnotations() |
IMethod.SourcePosition |
getParameterSourcePosition(int paramNum) |
TypeReference |
getParameterType(int index)
By convention, for a non-static method, getParameterType(0) is the this pointer
|
MethodReference |
getReference() |
int |
getReturnReg() |
TypeReference |
getReturnType() |
Selector |
getSelector()
something like: foo(Ljava/langString;)Ljava/lang/Class;
|
String |
getSignature()
something like: com.foo.bar.createLargeOrder(IILjava.lang.String;SLjava.sql.Date;)Ljava.lang.Integer;
|
IMethod.SourcePosition |
getSourcePosition(int instructionIndex) |
static int |
getTotalInsts() |
protected void |
handleINVOKE_VIRTUAL(int instLoc,
String cname,
String mname,
String pname,
int[] args,
org.jf.dexlib.Code.Opcode opcode) |
boolean |
hasExceptionHandler() |
int |
hashCode() |
boolean |
hasLocalVariableTable() |
protected InstructionArray |
instructions() |
boolean |
isAbstract()
Is this method abstract?
|
boolean |
isBridge()
Is this method a bridge method? See JLS 3rd Edition 15.12.4.5
|
boolean |
isClinit()
Is this method a class initializer?
|
boolean |
isFinal()
Is this method final?
|
boolean |
isInit()
Is this method an object initializer?
|
boolean |
isNative()
Is this method native?
|
boolean |
isPrivate()
Is this method private?
|
boolean |
isProtected()
Is this method protected?
|
boolean |
isPublic()
Is this method public?
|
boolean |
isStatic()
Is this member static?
|
boolean |
isSynchronized()
Is this method synchronized?
|
boolean |
isSynthetic()
Did someone synthesize this method? (As opposed to reading it from a class file)
|
boolean |
isVolatile() |
protected void |
parseBytecode() |
org.jf.dexlib.ClassDataItem.EncodedMethod |
toEncodedMethod() |
String |
toString() |
protected final DexIClass myClass
protected InstructionArray instructions
public DexIMethod(org.jf.dexlib.ClassDataItem.EncodedMethod encodedMethod,
DexIClass klass)
public static int getTotalInsts()
public org.jf.dexlib.ClassDataItem.EncodedMethod toEncodedMethod()
public TypeReference[] getDeclaredExceptions() throws InvalidClassFileException, UnsupportedOperationException
getDeclaredExceptions in interface IMethodInvalidClassFileExceptionUnsupportedOperationExceptionpublic String getLocalVariableName(int bcIndex, int localNumber)
getLocalVariableName in interface IMethodpublic int getMaxLocals()
com.ibm.wala.classLoader.IMethod#getMaxLocals()public int getReturnReg()
public int getExceptionReg()
public int getMaxStackHeight()
public Descriptor getDescriptor()
IMethodgetDescriptor in interface IMethodpublic int getNumberOfParameters()
IMethodgetNumberOfParameters in interface IMethodpublic int getNumberOfParameterRegisters()
public TypeReference getParameterType(int index)
IMethodgetParameterType in interface IMethodpublic MethodReference getReference()
getReference in interface IMethodpublic TypeReference getReturnType()
getReturnType in interface IMethodpublic Selector getSelector()
IMethodgetSelector in interface IMethodpublic String getSignature()
IMethodgetSignature in interface IMethodpublic boolean hasExceptionHandler()
hasExceptionHandler in interface IMethodpublic boolean hasLocalVariableTable()
hasLocalVariableTable in interface IMethodpublic boolean isAbstract()
IMethodisAbstract in interface IMethodpublic boolean isClinit()
IMethodpublic boolean isFinal()
IMethodpublic boolean isInit()
IMethodpublic boolean isNative()
IMethodpublic boolean isBridge()
IMethodpublic boolean isPrivate()
IMethodpublic boolean isProtected()
IMethodisProtected in interface IMethodpublic boolean isPublic()
IMethodpublic boolean isSynchronized()
IMethodisSynchronized in interface IMethodpublic boolean isSynthetic()
IMethodisSynthetic in interface IMethodpublic boolean isStatic()
IMemberpublic boolean isVolatile()
public IClass getDeclaringClass()
IMembergetDeclaringClass in interface IMemberpublic IClassHierarchy getClassHierarchy()
getClassHierarchy in interface IClassHierarchyDwellerpublic Atom getName()
public int getLineNumber(int bcIndex)
getLineNumber in interface IMethodpublic boolean equals(Object obj)
equals in class ObjectObject.equals(Object)public int hashCode()
hashCode in class ObjectObject.hashCode()public int getBytecodeIndex(int i)
throws InvalidClassFileException
getBytecodeIndex in interface IBytecodeMethodInvalidClassFileExceptionpublic ExceptionHandler[][] getHandlers() throws InvalidClassFileException
getHandlers in interface IBytecodeMethodInvalidClassFileExceptionpublic IInstruction[] getInstructions()
getInstructions in interface IBytecodeMethodprotected void parseBytecode()
protected void handleINVOKE_VIRTUAL(int instLoc,
String cname,
String mname,
String pname,
int[] args,
org.jf.dexlib.Code.Opcode opcode)
public Instruction[] getDexInstructions()
protected InstructionArray instructions()
public int getAddressFromIndex(int index)
public int getInstructionIndex(int bytecodeindex)
public Instruction getInstructionFromIndex(int instructionIndex)
public IndirectionData getIndirectionData()
getIndirectionData in interface IBytecodeMethodpublic Collection<CallSiteReference> getCallSites() throws InvalidClassFileException
IBytecodeMethodgetCallSites in interface IBytecodeMethodInvalidClassFileExceptionUnsupportedOperationExceptionpublic IMethod.SourcePosition getSourcePosition(int instructionIndex) throws InvalidClassFileException
getSourcePosition in interface IMethodInvalidClassFileExceptionpublic IMethod.SourcePosition getParameterSourcePosition(int paramNum) throws InvalidClassFileException
getParameterSourcePosition in interface IMethodInvalidClassFileExceptionpublic Collection<Annotation> getAnnotations()
IMembergetAnnotations in interface IMemberpublic Collection<Annotation> getAnnotations(boolean runtimeInvisible)
getAnnotations in interface IBytecodeMethodpublic Collection<Annotation>[] getParameterAnnotations()
getParameterAnnotations in interface IBytecodeMethod