Package com.ibm.wala.ipa.summaries
Class MethodSummary
- java.lang.Object
-
- com.ibm.wala.ipa.summaries.MethodSummary
-
public class MethodSummary extends Object
Summary information for a method.
-
-
Field Summary
Fields Modifier and Type Field Description protected static SSAInstruction[]
NO_STATEMENTS
-
Constructor Summary
Constructors Constructor Description MethodSummary(MethodReference method)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addConstant(Integer vn, ConstantValue value)
void
addPoison(String reason)
void
addStatement(SSAInstruction statement)
Map<Integer,ConstantValue>
getConstants()
MemberReference
getMethod()
Returns the method.int
getNextProgramCounter()
int
getNumberOfParameters()
int
getNumberOfStatements()
TypeReference
getParameterType(int i)
Note that by convention, getParameterType(0) == this for non-static methods.String
getPoison()
byte
getPoisonLevel()
TypeReference
getReturnType()
SSAInstruction[]
getStatements()
boolean
hasPoison()
boolean
isFactory()
boolean
isNative()
boolean
isStatic()
void
setFactory(boolean b)
Record if this is a "factory" method; meaning it returns some object which we know little about ...void
setPoisonLevel(byte b)
void
setStatic(boolean b)
String
toString()
-
-
-
Field Detail
-
NO_STATEMENTS
protected static final SSAInstruction[] NO_STATEMENTS
-
-
Constructor Detail
-
MethodSummary
public MethodSummary(MethodReference method)
-
-
Method Detail
-
getNumberOfStatements
public int getNumberOfStatements()
-
addStatement
public void addStatement(SSAInstruction statement)
-
addConstant
public void addConstant(Integer vn, ConstantValue value)
-
getMethod
public MemberReference getMethod()
Returns the method.- Returns:
- MethodReference
-
isNative
public boolean isNative()
-
addPoison
public void addPoison(String reason)
- Parameters:
reason
-
-
hasPoison
public boolean hasPoison()
-
getPoison
public String getPoison()
-
setPoisonLevel
public void setPoisonLevel(byte b)
-
getPoisonLevel
public byte getPoisonLevel()
-
getStatements
public SSAInstruction[] getStatements()
-
getConstants
public Map<Integer,ConstantValue> getConstants()
-
getNumberOfParameters
public int getNumberOfParameters()
- Returns:
- the number of parameters, including the implicit 'this'
-
isStatic
public boolean isStatic()
-
setStatic
public void setStatic(boolean b)
-
getReturnType
public TypeReference getReturnType()
-
getParameterType
public TypeReference getParameterType(int i)
Note that by convention, getParameterType(0) == this for non-static methods.
-
getNextProgramCounter
public int getNextProgramCounter()
-
setFactory
public void setFactory(boolean b)
Record if this is a "factory" method; meaning it returns some object which we know little about ... usually we'll resolve this based on downstream uses of the object- Parameters:
b
-
-
isFactory
public boolean isFactory()
-
-