Class AbstractRootMethod
java.lang.Object
com.ibm.wala.classLoader.SyntheticMethod
com.ibm.wala.ipa.callgraph.impl.AbstractRootMethod
- All Implemented Interfaces:
IMember, IMethod, ContextItem, IClassHierarchyDweller
- Direct Known Subclasses:
AstCallGraph.AstFakeRoot, FakeRootMethod, FakeWorldClinitMethod
A synthetic method from the
FakeRootClass-
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 IAnalysisCacheViewfinal IClassHierarchyprotected final SSAInstructionFactoryintThe number of the next local value number available for the fake root method.final ArrayList<SSAInstruction> Fields inherited from class SyntheticMethod
declaringClass, NO_STATEMENTS, resolvedMethod -
Constructor Summary
ConstructorsConstructorDescriptionAbstractRootMethod(MethodReference method, IClass declaringClass, IClassHierarchy cha, AnalysisOptions options, IAnalysisCacheView cache) AbstractRootMethod(MethodReference method, IClassHierarchy cha, AnalysisOptions options, IAnalysisCacheView cache) -
Method Summary
Modifier and TypeMethodDescriptionadd1DArrayAllocation(TypeReference T, int length) Add a New statement of the given array type and lengthAdd a New statement of the given typeAdd a New statement of the given typeintaddCheckcast(TypeReference[] types, int rv, boolean isPEI) intaddGetArrayField(TypeReference elementType, int baseObject, int indexValue) intaddGetInstance(FieldReference ref, int object) intaddInvocation(int[] params, CallSiteReference site) intaddLocal()intaddPhi(int[] values) addReturn(int vn, boolean isPrimitive) Add a return statementvoidaddSetArrayField(TypeReference elementType, int baseObject, int indexValue, int value) voidaddSetInstance(FieldReference ref, int baseObject, int value) voidaddSetStatic(FieldReference ref, int value) getStatements(SSAOptions options) intgetValueNumberForByteConstant(byte c) intgetValueNumberForCharConstant(char c) intgetValueNumberForIntConstant(int c) makeIR(Context context, SSAOptions options) Most subclasses should override this.Methods 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, hasExceptionHandler, hashCode, hasLocalVariableTable, hasPoison, isAbstract, isAnnotation, isBridge, isClinit, isEnum, isFactoryMethod, isFinal, isInit, isModule, isNative, isPrivate, isProtected, isPublic, isStatic, isSynchronized, isSynthetic, isWalaSynthetic, makeControlFlowGraph, toStringMethods inherited from interface IMethod
getNumberOfDefaultParameters
-
Field Details
-
statements
-
nextLocal
public int nextLocalThe number of the next local value number available for the fake root method. Note that we reserve value number 1 to represent the value "any exception caught by the root method" -
cha
-
cache
-
insts
-
-
Constructor Details
-
AbstractRootMethod
public AbstractRootMethod(MethodReference method, IClass declaringClass, IClassHierarchy cha, AnalysisOptions options, IAnalysisCacheView cache) -
AbstractRootMethod
public AbstractRootMethod(MethodReference method, IClassHierarchy cha, AnalysisOptions options, IAnalysisCacheView cache)
-
-
Method Details
-
getStatements
- Overrides:
getStatementsin classSyntheticMethod- See Also:
-
makeIR
Description copied from class:SyntheticMethodMost subclasses should override this.- Overrides:
makeIRin classSyntheticMethod- Parameters:
context- TODOoptions- options governing IR conversion
-
addLocal
public int addLocal() -
addInvocation
- Returns:
- the invoke instructions added by this operation
- Throws:
IllegalArgumentException- if site is null
-
addReturn
Add a return statement -
addAllocation
Add a New statement of the given typeSide effect: adds call to default constructor of given type if one exists.
- Returns:
- instruction added, or null
- Throws:
IllegalArgumentException- if T is null
-
add1DArrayAllocation
Add a New statement of the given array type and length -
addAllocationWithoutCtor
Add a New statement of the given type -
getValueNumberForIntConstant
public int getValueNumberForIntConstant(int c) -
getValueNumberForByteConstant
public int getValueNumberForByteConstant(byte c) -
getValueNumberForCharConstant
public int getValueNumberForCharConstant(char c) -
addPhi
public int addPhi(int[] values) -
addGetInstance
-
addGetStatic
-
addCheckcast
-
addSetInstance
-
addSetStatic
-
addSetArrayField
-
addGetArrayField
-
getInterpreter
-