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 protected
SpecializedFactoryMethod(SummarizedMethod m, Context context, Set S)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected void
addStatementsForTypeAbstraction(TypeAbstraction T)
boolean
equals(Object obj)
Two specialized methods can be different, even if they represent the same source method.List<SSAInstruction>
getAllocationStatements()
IClass
getDeclaringClass()
Return the object that represents the declaring class for this member.List<SSAInstruction>
getInvokeStatements()
int
getNumberOfParameters()
Method getNumberOfParameters.TypeReference
getParameterType(int i)
By convention, for a non-static method, getParameterType(0) is the this pointerSSAInstruction[]
getStatements()
int
hashCode()
IR
makeIR(Context C, SSAOptions options)
Most subclasses should override this.String
toString()
-
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:
equals
in classSyntheticMethod
- See Also:
Object.equals(java.lang.Object)
-
hashCode
public int hashCode()
- Overrides:
hashCode
in classSyntheticMethod
-
toString
public String toString()
- Overrides:
toString
in classSyntheticMethod
-
getStatements
public SSAInstruction[] getStatements()
- Overrides:
getStatements
in classSyntheticMethod
-
getDeclaringClass
public IClass getDeclaringClass()
Description copied from interface:IMember
Return the object that represents the declaring class for this member.- Specified by:
getDeclaringClass
in interfaceIMember
- Overrides:
getDeclaringClass
in classSyntheticMethod
- Returns:
- the object that represents the declaring class for this member.
-
getNumberOfParameters
public int getNumberOfParameters()
Description copied from interface:IMethod
Method getNumberOfParameters. This result includes the "this" pointer if applicable- Specified by:
getNumberOfParameters
in interfaceIMethod
- Overrides:
getNumberOfParameters
in classSyntheticMethod
- See Also:
IMethod.getNumberOfParameters()
-
getParameterType
public TypeReference getParameterType(int i)
Description copied from interface:IMethod
By convention, for a non-static method, getParameterType(0) is the this pointer- Specified by:
getParameterType
in interfaceIMethod
- Overrides:
getParameterType
in classSyntheticMethod
-
makeIR
public IR makeIR(Context C, SSAOptions options)
Description copied from class:SyntheticMethod
Most subclasses should override this.- Overrides:
makeIR
in classSyntheticMethod
- Parameters:
C
- TODOoptions
- options governing IR conversion
-
-