Class AbstractReflectionInterpreter.SpecializedMethod
java.lang.Object
com.ibm.wala.classLoader.SyntheticMethod
com.ibm.wala.analysis.reflection.AbstractReflectionInterpreter.SpecializedMethod
- All Implemented Interfaces:
IMember, IMethod, ContextItem, IClassHierarchyDweller
- Direct Known Subclasses:
FactoryBypassInterpreter.SpecializedFactoryMethod
- Enclosing class:
AbstractReflectionInterpreter
-
Nested Class Summary
Nested classes/interfaces inherited from interface ContextItem
ContextItem.Value<T>Nested classes/interfaces inherited from interface IMethod
IMethod.SourcePosition -
Field Summary
FieldsModifier and TypeFieldDescriptionprotected final ArrayList<SSAInstruction> List of all instructionsprotected final ArrayList<SSAInstruction> List of synthetic allocation statements we model for this specialized instanceprotected final ArrayList<SSAInstruction> List of synthetic invoke instructions we model for this specialized instance.protected final HashSet<TypeReference> Set of types that we have already inserted an allocation for.Fields inherited from class SyntheticMethod
declaringClass, NO_STATEMENTS, resolvedMethodModifier and TypeFieldDescriptionfinal IClassstatic final SSAInstruction[]protected final IMethod -
Constructor Summary
ConstructorsConstructorDescriptionSpecializedMethod(IMethod method, IClass declaringClass, boolean isStatic, boolean isFactory) SpecializedMethod(MethodReference method, IClass declaringClass, boolean isStatic, boolean isFactory) -
Method Summary
Modifier and TypeMethodDescriptionprotected voidaddCtorInvokeInstruction(TypeReference t, int alloc) Add an instruction to invoke the default constructor on the object of value number alloc of type t.protected voidaddInstruction(TypeReference T, SSAInstruction instr, boolean isAllocation) protected intMethods inherited from class SyntheticMethod
equals, getAnnotations, getBytecodeStream, getClassHierarchy, getDeclaredExceptions, getDeclaringClass, getDescriptor, getLineNumber, getLocalVariableName, getMaxLocals, getMaxStackHeight, getName, getNumberOfParameters, getParameterSourcePosition, getParameterType, getPoison, getPoisonLevel, getReference, getReturnType, getSelector, getSignature, getSourcePosition, getStatements, getStatements, hasExceptionHandler, hashCode, hasLocalVariableTable, hasPoison, isAbstract, isAnnotation, isBridge, isClinit, isEnum, isFactoryMethod, isFinal, isInit, isModule, isNative, isPrivate, isProtected, isPublic, isStatic, isSynchronized, isSynthetic, isWalaSynthetic, makeControlFlowGraph, makeIR, toStringModifier and TypeMethodDescriptionbooleanGet the annotations on this member, if anyReturn the object that represents the declaring class for this member.something like: (IILjava.lang.String;SLjava.sql.Date;)Ljava.lang.Integer;intgetLineNumber(int bcIndex) getLocalVariableName(int bcIndex, int localNumber) intintgetName()intMethod getNumberOfParameters.getParameterSourcePosition(int paramNum) getParameterType(int i) By convention, for a non-static method, getParameterType(0) is the this pointerbytesomething like: foo(Ljava/langString;)Ljava/lang/Class;something like: com.foo.bar.createLargeOrder(IILjava.lang.String;SLjava.sql.Date;)Ljava.lang.Integer;getSourcePosition(int bcIndex) getStatements(SSAOptions options) Deprecated.booleaninthashCode()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()booleanbooleanisFinal()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?booleanisStatic()Is this member static?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()makeControlFlowGraph(SSAInstruction[] instructions) Create anInducedCFGfrom an instruction array.makeIR(Context context, SSAOptions options) Most subclasses should override this.toString()Methods inherited from interface IMethod
getNumberOfDefaultParameters
-
Field Details
-
typesAllocated
Set of types that we have already inserted an allocation for. -
allocations
List of synthetic allocation statements we model for this specialized instance -
calls
List of synthetic invoke instructions we model for this specialized instance. -
allInstructions
List of all instructions
-
-
Constructor Details
-
SpecializedMethod
public SpecializedMethod(MethodReference method, IClass declaringClass, boolean isStatic, boolean isFactory) -
SpecializedMethod
-
-
Method Details
-
addInstruction
- Parameters:
T- type allocated by the instruction.
-
addStatementsForConcreteSimpleType
- Parameters:
t- type of object to allocate- Returns:
- value number of the newly allocated object
-
addCtorInvokeInstruction
Add an instruction to invoke the default constructor on the object of value number alloc of type t.
-