Class FactoryBypassInterpreter.SpecializedFactoryMethod
java.lang.Object
com.ibm.wala.classLoader.SyntheticMethod
com.ibm.wala.analysis.reflection.AbstractReflectionInterpreter.SpecializedMethod
com.ibm.wala.analysis.reflection.FactoryBypassInterpreter.SpecializedFactoryMethod
- All Implemented Interfaces:
IMember, IMethod, ContextItem, IClassHierarchyDweller
- Enclosing class:
FactoryBypassInterpreter
protected class FactoryBypassInterpreter.SpecializedFactoryMethod
extends AbstractReflectionInterpreter.SpecializedMethod
-
Nested Class Summary
Nested classes/interfaces inherited from interface ContextItem
ContextItem.Value<T>Nested classes/interfaces inherited from interface IMethod
IMethod.SourcePosition -
Field Summary
Fields inherited from class AbstractReflectionInterpreter.SpecializedMethod
allInstructions, allocations, typesAllocatedModifier and TypeFieldDescriptionprotected final ArrayList<SSAInstruction> List of all instructionsprotected final ArrayList<SSAInstruction> List of synthetic allocation statements we model for this specialized instanceprotected 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
ConstructorsModifierConstructorDescriptionprotectedSpecializedFactoryMethod(SummarizedMethod m, Context context, Set<TypeReference> S) -
Method Summary
Modifier and TypeMethodDescriptionprotected voidbooleanTwo specialized methods can be different, even if they represent the same source method.Return the object that represents the declaring class for this member.intMethod getNumberOfParameters.getParameterType(int i) By convention, for a non-static method, getParameterType(0) is the this pointerinthashCode()makeIR(Context C, SSAOptions options) Most subclasses should override this.Methods inherited from class AbstractReflectionInterpreter.SpecializedMethod
addCtorInvokeInstruction, addInstruction, addStatementsForConcreteSimpleTypeModifier 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
getAnnotations, getBytecodeStream, getClassHierarchy, getDeclaredExceptions, getDescriptor, getLineNumber, getLocalVariableName, getMaxLocals, getMaxStackHeight, getName, getParameterSourcePosition, getPoison, getPoisonLevel, getReference, getReturnType, getSelector, getSignature, getSourcePosition, getStatements, hasExceptionHandler, hasLocalVariableTable, hasPoison, isAbstract, isAnnotation, isBridge, isClinit, isEnum, isFactoryMethod, isFinal, isInit, isModule, isNative, isPrivate, isProtected, isPublic, isStatic, isSynchronized, isSynthetic, isWalaSynthetic, makeControlFlowGraph, toStringModifier and TypeMethodDescriptionGet the annotations on this member, if anysomething like: (IILjava.lang.String;SLjava.sql.Date;)Ljava.lang.Integer;intgetLineNumber(int bcIndex) getLocalVariableName(int bcIndex, int localNumber) intintgetName()getParameterSourcePosition(int paramNum) bytesomething 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.booleanbooleanbooleanbooleanIs 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.toString()Methods inherited from interface IMethod
getNumberOfDefaultParameters
-
Constructor Details
-
SpecializedFactoryMethod
-
-
Method Details
-
addStatementsForTypeAbstraction
-
getAllocationStatements
-
getInvokeStatements
-
equals
Two specialized methods can be different, even if they represent the same source method. So, revert to object identity for testing equality. TODO: this is non-optimal; could try to re-use specialized methods that have the same context.- Overrides:
equalsin classSyntheticMethod- See Also:
-
hashCode
public int hashCode()- Overrides:
hashCodein classSyntheticMethod
-
getStatements
- Overrides:
getStatementsin classSyntheticMethod
-
getDeclaringClass
Description copied from interface:IMemberReturn the object that represents the declaring class for this member.- Specified by:
getDeclaringClassin interfaceIMember- Overrides:
getDeclaringClassin classSyntheticMethod- Returns:
- the object that represents the declaring class for this member.
-
getNumberOfParameters
public int getNumberOfParameters()Description copied from interface:IMethodMethod getNumberOfParameters. This result includes the "this" pointer if applicable- Specified by:
getNumberOfParametersin interfaceIMethod- Overrides:
getNumberOfParametersin classSyntheticMethod
-
getParameterType
Description copied from interface:IMethodBy convention, for a non-static method, getParameterType(0) is the this pointer- Specified by:
getParameterTypein interfaceIMethod- Overrides:
getParameterTypein classSyntheticMethod
-
makeIR
Description copied from class:SyntheticMethodMost subclasses should override this.- Overrides:
makeIRin classSyntheticMethod- Parameters:
C- TODOoptions- options governing IR conversion
-