Interface IBytecodeMethod<I>
- All Superinterfaces:
ContextItem, IClassHierarchyDweller, IMember, IMethod
- All Known Implementing Classes:
DexIMethod, ShrikeCTMethod
A method which originated in bytecode, decoded by Shrike
-
Nested Class Summary
Nested classes/interfaces inherited from interface ContextItem
ContextItem.Value<T>Nested classes/interfaces inherited from interface IMethod
IMethod.SourcePosition -
Method Summary
Modifier and TypeMethodDescriptiongetAnnotations(boolean runtimeInvisible) intgetBytecodeIndex(int i) thereExceptionHandler[][]intgetInstructionIndex(int bcIndex) I[]Methods inherited from interface IClassHierarchyDweller
getClassHierarchyMethods inherited from interface IMember
getAnnotations, getDeclaringClass, getName, isStaticMethods inherited from interface IMethod
getDeclaredExceptions, getDescriptor, getLineNumber, getLocalVariableName, getNumberOfDefaultParameters, getNumberOfParameters, getParameterSourcePosition, getParameterType, getReference, getReturnType, getSelector, getSignature, getSourcePosition, hasExceptionHandler, hasLocalVariableTable, isAbstract, isAnnotation, isBridge, isClinit, isEnum, isFinal, isInit, isModule, isNative, isPrivate, isProtected, isPublic, isSynchronized, isSynthetic, isWalaSyntheticModifier and TypeMethodDescriptionsomething like: (IILjava.lang.String;SLjava.sql.Date;)Ljava.lang.Integer;intgetLineNumber(int bcIndex) getLocalVariableName(int bcIndex, int localNumber) default intintMethod getNumberOfParameters.getParameterSourcePosition(int paramNum) getParameterType(int i) By convention, for a non-static method, getParameterType(0) is the this pointersomething like: foo(Ljava/langString;)Ljava/lang/Class;something like: com.foo.bar.createLargeOrder(IILjava.lang.String;SLjava.sql.Date;)Ljava.lang.Integer;getSourcePosition(int instructionIndex) booleanbooleanbooleanIs this method abstract?booleanbooleanisBridge()Is this method a bridge method? See JLS 3rd Edition 15.12.4.5booleanisClinit()Is this method a class initializer?booleanisEnum()booleanisFinal()Is this method final?booleanisInit()Is this method an object initializer?booleanisModule()booleanisNative()Is this method native?booleanIs this method private?booleanIs this method protected?booleanisPublic()Is this method public?booleanIs this method synchronized?booleanIs this method synthetic, i.e., compiler-generated (this refers to the synthetic flag in java/dex bytecode)booleanIs the implementation of this method a model generated by WALA? For compiler-generated synthetic methods, refer toIMethod.isSynthetic()
-
Method Details
-
getBytecodeIndex
- Returns:
- the bytecode index corresponding to instruction i in the getInstructions() array
- Throws:
InvalidClassFileException
-
getInstructionIndex
- Returns:
- the instruction index i in the getInstructions() array corresponding to the bytecode index bcIndex
- Throws:
InvalidClassFileException
-
getHandlers
- Returns:
- the Shrike representation of the exception handlers
- Throws:
InvalidClassFileException
-
getInstructions
- Returns:
- the Shrike instructions decoded from the bytecode
- Throws:
InvalidClassFileException
-
getCallSites
there- Returns:
- the call sites declared in the bytecode for this method
- Throws:
InvalidClassFileException
-
getFieldsRead
- Throws:
InvalidClassFileException
-
getFieldsWritten
- Throws:
InvalidClassFileException
-
getArraysWritten
- Throws:
InvalidClassFileException
-
getNewSites
- Returns:
- the new sites declared in the bytecode for this method
- Throws:
InvalidClassFileException
-
getIndirectionData
IndirectionData getIndirectionData()- Returns:
- information about any indirect uses of local variables
-
getParameterAnnotations
Collection<Annotation>[] getParameterAnnotations() -
getAnnotations
- Throws:
InvalidClassFileException
-