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 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
ConstructorDescriptionSummarizedMethodWithNames
(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.boolean
makeIR
(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, isAnnotation, isBridge, isClinit, isEnum, isFactoryMethod, isFinal, isInit, isModule, isPrivate, isProtected, isPublic, isSynchronized, isSynthetic, isWalaSynthetic, makeControlFlowGraph, toString
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
Methods inherited from interface com.ibm.wala.classLoader.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:
getLocalVariableName
in interfaceIMethod
- Overrides:
getLocalVariableName
in 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:
hasLocalVariableTable
in interfaceIMethod
- Overrides:
hasLocalVariableTable
in classSyntheticMethod
- Returns:
- true iff the local variable table information for this method is available
-
makeIR
Description copied from class:SyntheticMethod
Most subclasses should override this.- Overrides:
makeIR
in classSummarizedMethod
- Parameters:
context
- TODOoptions
- options governing IR conversion
-