Package com.ibm.wala.analysis.reflection
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 com.ibm.wala.ipa.callgraph.ContextItem
ContextItem.Value<T>
-
Nested classes/interfaces inherited from interface com.ibm.wala.classLoader.IMethod
IMethod.SourcePosition
-
-
Field Summary
-
Fields inherited from class com.ibm.wala.analysis.reflection.AbstractReflectionInterpreter.SpecializedMethod
allInstructions, allocations, typesAllocated
-
Fields inherited from class com.ibm.wala.classLoader.SyntheticMethod
declaringClass, NO_STATEMENTS, resolvedMethod
-
-
Constructor Summary
Constructors Modifier Constructor Description protectedSpecializedFactoryMethod(SummarizedMethod m, Context context, Set S)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected voidaddStatementsForTypeAbstraction(TypeAbstraction T)booleanequals(Object obj)Two specialized methods can be different, even if they represent the same source method.List<SSAInstruction>getAllocationStatements()IClassgetDeclaringClass()Return the object that represents the declaring class for this member.List<SSAInstruction>getInvokeStatements()intgetNumberOfParameters()Method getNumberOfParameters.TypeReferencegetParameterType(int i)By convention, for a non-static method, getParameterType(0) is the this pointerSSAInstruction[]getStatements()inthashCode()IRmakeIR(Context C, SSAOptions options)Most subclasses should override this.StringtoString()-
Methods inherited from class com.ibm.wala.analysis.reflection.AbstractReflectionInterpreter.SpecializedMethod
addCtorInvokeInstruction, addInstruction, addStatementsForConcreteSimpleType
-
Methods inherited from class com.ibm.wala.classLoader.SyntheticMethod
getAnnotations, getBytecodeStream, getClassHierarchy, getDeclaredExceptions, getDescriptor, getLineNumber, getLocalVariableName, getMaxLocals, getMaxStackHeight, getName, getParameterSourcePosition, getPoison, getPoisonLevel, getReference, getReturnType, getSelector, getSignature, getSourcePosition, getStatements, hasExceptionHandler, hasLocalVariableTable, hasPoison, isAbstract, isBridge, isClinit, isFactoryMethod, isFinal, isInit, isNative, isPrivate, isProtected, isPublic, isStatic, isSynchronized, isSynthetic, makeControlFlowGraph
-
-
-
-
Constructor Detail
-
SpecializedFactoryMethod
protected SpecializedFactoryMethod(SummarizedMethod m, Context context, Set S)
-
-
Method Detail
-
addStatementsForTypeAbstraction
protected void addStatementsForTypeAbstraction(TypeAbstraction T)
-
getAllocationStatements
public List<SSAInstruction> getAllocationStatements()
-
getInvokeStatements
public List<SSAInstruction> getInvokeStatements()
-
equals
public boolean equals(Object obj)
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:
Object.equals(java.lang.Object)
-
hashCode
public int hashCode()
- Overrides:
hashCodein classSyntheticMethod
-
toString
public String toString()
- Overrides:
toStringin classSyntheticMethod
-
getStatements
public SSAInstruction[] getStatements()
- Overrides:
getStatementsin classSyntheticMethod
-
getDeclaringClass
public IClass 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- See Also:
IMethod.getNumberOfParameters()
-
getParameterType
public TypeReference getParameterType(int i)
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
public IR makeIR(Context C, SSAOptions options)
Description copied from class:SyntheticMethodMost subclasses should override this.- Overrides:
makeIRin classSyntheticMethod- Parameters:
C- TODOoptions- options governing IR conversion
-
-