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, resolvedMethodModifier and TypeFieldDescriptionfinal IClassstatic final SSAInstruction[]protected final IMethod -
Constructor Summary
ConstructorsConstructorDescriptionSummarizedMethodWithNames(MethodReference ref, MethodSummary summary, IClass declaringClass) SummarizedMethodWithNames(MethodReference ref, MethodSummary summary, IClass declaringClass, Map<Integer, @NonNull 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, isStaticModifier and TypeMethodDescriptionintMethod getNumberOfParameters.getParameterType(int i) By convention, for a non-static method, getParameterType(0) is the this pointerbytegetStatements(SSAOptions options) booleanbooleanIs this method abstract?booleanisNative()Is this method native?booleanisStatic()Is this member static?Methods 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, toStringModifier and TypeMethodDescriptionbooleanGet the annotations on this member, if anyReturn the object that represents the declaring class for this member.something like: (IILjava.lang.String;SLjava.sql.Date;)Ljava.lang.Integer;intgetLineNumber(int bcIndex) intintgetName()getParameterSourcePosition(int paramNum) something like: foo(Ljava/langString;)Ljava/lang/Class;something like: com.foo.bar.createLargeOrder(IILjava.lang.String;SLjava.sql.Date;)Ljava.lang.Integer;getSourcePosition(int bcIndex) booleaninthashCode()booleanbooleanisBridge()Is this method a bridge method? See JLS 3rd Edition 15.12.4.5booleanisClinit()Is this method a class initializer?booleanisEnum()booleanbooleanisFinal()Is this method final?booleanisInit()Is this method an object initializer?booleanisModule()booleanIs this method private?booleanIs this method protected?booleanisPublic()Is this method public?booleanIs this method synchronized?booleanIs this method synthetic, i.e., compiler-generated (this refers to the synthetic flag in java/dex bytecode)booleanIs the implementation of this method a model generated by WALA? For compiler-generated synthetic methods, refer toIMethod.isSynthetic()makeControlFlowGraph(SSAInstruction[] instructions) Create anInducedCFGfrom an instruction array.toString()Methods inherited from interface IMethod
getNumberOfDefaultParameters
-
Constructor Details
-
SummarizedMethodWithNames
-
SummarizedMethodWithNames
public SummarizedMethodWithNames(MethodReference ref, MethodSummary summary, IClass declaringClass, Map<Integer, @NonNull 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
-