public class DexIMethod extends Object implements IBytecodeMethod
IMethod.SourcePosition
ContextItem.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 IMethod
InvalidClassFileException
UnsupportedOperationException
public String getLocalVariableName(int bcIndex, int localNumber)
getLocalVariableName
in interface IMethod
public int getMaxLocals()
com.ibm.wala.classLoader.IMethod#getMaxLocals()
public int getReturnReg()
public int getExceptionReg()
public int getMaxStackHeight()
public Descriptor getDescriptor()
IMethod
getDescriptor
in interface IMethod
public int getNumberOfParameters()
IMethod
getNumberOfParameters
in interface IMethod
public int getNumberOfParameterRegisters()
public TypeReference getParameterType(int index)
IMethod
getParameterType
in interface IMethod
public MethodReference getReference()
getReference
in interface IMethod
public TypeReference getReturnType()
getReturnType
in interface IMethod
public Selector getSelector()
IMethod
getSelector
in interface IMethod
public String getSignature()
IMethod
getSignature
in interface IMethod
public boolean hasExceptionHandler()
hasExceptionHandler
in interface IMethod
public boolean hasLocalVariableTable()
hasLocalVariableTable
in interface IMethod
public boolean isAbstract()
IMethod
isAbstract
in interface IMethod
public boolean isClinit()
IMethod
public boolean isFinal()
IMethod
public boolean isInit()
IMethod
public boolean isNative()
IMethod
public boolean isBridge()
IMethod
public boolean isPrivate()
IMethod
public boolean isProtected()
IMethod
isProtected
in interface IMethod
public boolean isPublic()
IMethod
public boolean isSynchronized()
IMethod
isSynchronized
in interface IMethod
public boolean isSynthetic()
IMethod
isSynthetic
in interface IMethod
public boolean isStatic()
IMember
public boolean isVolatile()
public IClass getDeclaringClass()
IMember
getDeclaringClass
in interface IMember
public IClassHierarchy getClassHierarchy()
getClassHierarchy
in interface IClassHierarchyDweller
public Atom getName()
public int getLineNumber(int bcIndex)
getLineNumber
in interface IMethod
public boolean equals(Object obj)
equals
in class Object
Object.equals(Object)
public int hashCode()
hashCode
in class Object
Object.hashCode()
public int getBytecodeIndex(int i) throws InvalidClassFileException
getBytecodeIndex
in interface IBytecodeMethod
InvalidClassFileException
public ExceptionHandler[][] getHandlers() throws InvalidClassFileException
getHandlers
in interface IBytecodeMethod
InvalidClassFileException
public IInstruction[] getInstructions()
getInstructions
in interface IBytecodeMethod
protected 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 IBytecodeMethod
public Collection<CallSiteReference> getCallSites() throws InvalidClassFileException
IBytecodeMethod
getCallSites
in interface IBytecodeMethod
InvalidClassFileException
UnsupportedOperationException
public IMethod.SourcePosition getSourcePosition(int instructionIndex) throws InvalidClassFileException
getSourcePosition
in interface IMethod
InvalidClassFileException
public IMethod.SourcePosition getParameterSourcePosition(int paramNum) throws InvalidClassFileException
getParameterSourcePosition
in interface IMethod
InvalidClassFileException
public Collection<Annotation> getAnnotations()
IMember
getAnnotations
in interface IMember
public Collection<Annotation> getAnnotations(boolean runtimeInvisible)
getAnnotations
in interface IBytecodeMethod
public Collection<Annotation>[] getParameterAnnotations()
getParameterAnnotations
in interface IBytecodeMethod