Class SummarizedMethodWithNames
java.lang.Object
com.ibm.wala.classLoader.SyntheticMethod
com.ibm.wala.ipa.summaries.SummarizedMethod
com.ibm.wala.ipa.summaries.SummarizedMethodWithNames
- All Implemented Interfaces:
IMember, IMethod, ContextItem, IClassHierarchyDweller
A SummarizedMethod (for synthetic functions) with variable names.
Using this class instead of a normal SummarizedMethod enables the use of human-readable variable names in synthetic methods. This should not change th analysis-result but may come in handy when debugging.
- Since:
- 2013-11-25
- Author:
- Tobias Blaschke <code@tobiasblaschke.de>
-
Nested Class Summary
Nested ClassesNested classes/interfaces inherited from interface ContextItem
ContextItem.Value<T>Nested classes/interfaces inherited from interface IMethod
IMethod.SourcePosition -
Field Summary
Fields inherited from class SyntheticMethod
declaringClass, NO_STATEMENTS, resolvedMethod -
Constructor Summary
ConstructorsConstructorDescriptionSummarizedMethodWithNames(MethodReference ref, MethodSummary summary, IClass declaringClass) SummarizedMethodWithNames(MethodReference ref, MethodSummary summary, IClass declaringClass, Map<Integer, Atom> localNames) SummarizedMethodWithNames(MethodReference ref, VolatileMethodSummary summary, IClass declaringClass) -
Method Summary
Modifier and TypeMethodDescriptiongetLocalVariableName(int bcIndex, int localNumber) Returns the variable name to a ssa-number.booleanmakeIR(Context context, SSAOptions options) Most subclasses should override this.Methods inherited from class SummarizedMethod
getNumberOfParameters, getParameterType, getPoison, getPoisonLevel, getStatements, hasPoison, isAbstract, isNative, isStaticMethods inherited from class SyntheticMethod
equals, getAnnotations, getBytecodeStream, getClassHierarchy, getDeclaredExceptions, getDeclaringClass, getDescriptor, getLineNumber, getMaxLocals, getMaxStackHeight, getName, getParameterSourcePosition, getReference, getReturnType, getSelector, getSignature, getSourcePosition, getStatements, hasExceptionHandler, hashCode, isAnnotation, isBridge, isClinit, isEnum, isFactoryMethod, isFinal, isInit, isModule, isPrivate, isProtected, isPublic, isSynchronized, isSynthetic, isWalaSynthetic, makeControlFlowGraph, toStringMethods inherited from interface IMethod
getNumberOfDefaultParameters
-
Constructor Details
-
SummarizedMethodWithNames
-
SummarizedMethodWithNames
public SummarizedMethodWithNames(MethodReference ref, MethodSummary summary, IClass declaringClass, Map<Integer, Atom> localNames) throws NullPointerException- Throws:
NullPointerException
-
SummarizedMethodWithNames
public SummarizedMethodWithNames(MethodReference ref, VolatileMethodSummary summary, IClass declaringClass) throws NullPointerException - Throws:
NullPointerException
-
-
Method Details
-
getLocalVariableName
Returns the variable name to a ssa-number.Does not respect the value of bcIndex.
- Specified by:
getLocalVariableNamein interfaceIMethod- Overrides:
getLocalVariableNamein classSummarizedMethod- Returns:
- the (source code) name of the local variable of a given number at the specified program counter, or null if the information is not available.
-
hasLocalVariableTable
public boolean hasLocalVariableTable()- Specified by:
hasLocalVariableTablein interfaceIMethod- Overrides:
hasLocalVariableTablein classSyntheticMethod- Returns:
- true iff the local variable table information for this method is available
-
makeIR
Description copied from class:SyntheticMethodMost subclasses should override this.- Overrides:
makeIRin classSummarizedMethod- Parameters:
context- TODOoptions- options governing IR conversion
-