Package com.ibm.wala.ipa.summaries
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
public class SummarizedMethodWithNames extends SummarizedMethod
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
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classSummarizedMethodWithNames.SyntheticIRWithNames-
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.classLoader.SyntheticMethod
declaringClass, NO_STATEMENTS, resolvedMethod
-
-
Constructor Summary
Constructors Constructor Description SummarizedMethodWithNames(MethodReference ref, MethodSummary summary, IClass declaringClass, Map<Integer,Atom> localNames)SummarizedMethodWithNames(MethodReference ref, VolatileMethodSummary summary, IClass declaringClass)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description StringgetLocalVariableName(int bcIndex, int localNumber)Returns the variable name to a ssa-number.booleanhasLocalVariableTable()IRmakeIR(Context context, SSAOptions options)Most subclasses should override this.-
Methods inherited from class com.ibm.wala.ipa.summaries.SummarizedMethod
getNumberOfParameters, getParameterType, getPoison, getPoisonLevel, getStatements, hasPoison, isAbstract, isNative, isStatic
-
Methods inherited from class com.ibm.wala.classLoader.SyntheticMethod
equals, getAnnotations, getBytecodeStream, getClassHierarchy, getDeclaredExceptions, getDeclaringClass, getDescriptor, getLineNumber, getMaxLocals, getMaxStackHeight, getName, getParameterSourcePosition, getReference, getReturnType, getSelector, getSignature, getSourcePosition, getStatements, hasExceptionHandler, hashCode, isBridge, isClinit, isFactoryMethod, isFinal, isInit, isPrivate, isProtected, isPublic, isSynchronized, isSynthetic, makeControlFlowGraph, toString
-
-
-
-
Constructor Detail
-
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 Detail
-
getLocalVariableName
public String getLocalVariableName(int bcIndex, int localNumber)
Returns the variable name to a ssa-number. Does not respect the value of bcIndex.- Specified by:
getLocalVariableNamein interfaceIMethod- Overrides:
getLocalVariableNamein classSyntheticMethod- 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
public IR makeIR(Context context, SSAOptions options)
Description copied from class:SyntheticMethodMost subclasses should override this.- Overrides:
makeIRin classSummarizedMethod- Parameters:
context- TODOoptions- options governing IR conversion
-
-