public class SyntheticMethod extends Object implements IMethod
IMethod.SourcePosition
ContextItem.Value<T>
Modifier and Type | Field and Description |
---|---|
protected IClass |
declaringClass |
static SSAInstruction[] |
NO_STATEMENTS |
protected IMethod |
resolvedMethod |
Constructor and Description |
---|
SyntheticMethod(IMethod method,
IClass declaringClass,
boolean isStatic,
boolean isFactory) |
SyntheticMethod(MethodReference method,
IClass declaringClass,
boolean isStatic,
boolean isFactory) |
Modifier and Type | Method and Description |
---|---|
boolean |
equals(Object obj) |
Collection<Annotation> |
getAnnotations()
Get the annotations on this member, if any
|
BytecodeStream |
getBytecodeStream() |
IClassHierarchy |
getClassHierarchy() |
TypeReference[] |
getDeclaredExceptions() |
IClass |
getDeclaringClass()
Return the object that represents the declaring class
for this member.
|
Descriptor |
getDescriptor()
something like: (IILjava.lang.String;SLjava.sql.Date;)Ljava.lang.Integer;
|
int |
getLineNumber(int bcIndex)
END Custom change: precise bytecode positions
|
String |
getLocalVariableName(int bcIndex,
int localNumber) |
int |
getMaxLocals() |
int |
getMaxStackHeight() |
Atom |
getName() |
int |
getNumberOfParameters()
Method getNumberOfParameters.
|
IMethod.SourcePosition |
getParameterSourcePosition(int paramNum) |
TypeReference |
getParameterType(int i)
By convention, for a non-static method, getParameterType(0) is the this pointer
|
String |
getPoison() |
byte |
getPoisonLevel() |
MethodReference |
getReference() |
TypeReference |
getReturnType() |
Selector |
getSelector()
something like: foo(Ljava/langString;)Ljava/lang/Class;
|
String |
getSignature()
something like: com.foo.bar.createLargeOrder(IILjava.lang.String;SLjava.sql.Date;)Ljava.lang.Integer;
|
IMethod.SourcePosition |
getSourcePosition(int bcIndex)
BEGIN Custom change: : precise bytecode positions
|
SSAInstruction[] |
getStatements() |
SSAInstruction[] |
getStatements(SSAOptions options)
Deprecated.
|
boolean |
hasExceptionHandler() |
int |
hashCode() |
boolean |
hasLocalVariableTable() |
boolean |
hasPoison() |
boolean |
isAbstract()
Is this method abstract?
|
boolean |
isBridge()
Is this method a bridge method? See JLS 3rd Edition 15.12.4.5
|
boolean |
isClinit()
Is this method a class initializer?
|
boolean |
isFactoryMethod() |
boolean |
isFinal()
Is this method final?
|
boolean |
isInit()
Is this method an object initializer?
|
boolean |
isNative()
Is this method native?
|
boolean |
isPrivate()
Is this method private?
|
boolean |
isProtected()
Is this method protected?
|
boolean |
isPublic()
Is this method public?
|
boolean |
isStatic()
Is this member static?
|
boolean |
isSynchronized()
Is this method synchronized?
|
boolean |
isSynthetic()
Did someone synthesize this method? (As opposed to reading it from a class file)
|
InducedCFG |
makeControlFlowGraph(SSAInstruction[] instructions)
Create an
InducedCFG from an instruction array. |
IR |
makeIR(Context context,
SSAOptions options)
Most subclasses should override this.
|
String |
toString() |
public static final SSAInstruction[] NO_STATEMENTS
protected final IMethod resolvedMethod
protected final IClass declaringClass
public SyntheticMethod(MethodReference method, IClass declaringClass, boolean isStatic, boolean isFactory)
public boolean isClinit()
IMethod
isClinit
in interface IMethod
IMethod.isClinit()
public boolean isInit()
IMethod
isInit
in interface IMethod
IMethod.isInit()
public boolean isStatic()
IMember
isStatic
in interface IMember
IMember.isStatic()
public boolean isNative()
IMethod
isNative
in interface IMethod
IMethod.isNative()
public boolean isAbstract()
IMethod
isAbstract
in interface IMethod
IMethod.isAbstract()
public boolean isPrivate()
IMethod
isPrivate
in interface IMethod
IMethod.isPrivate()
public boolean isProtected()
IMethod
isProtected
in interface IMethod
public boolean isPublic()
IMethod
public boolean isFinal()
IMethod
isFinal
in interface IMethod
IMethod.isFinal()
public boolean isBridge()
IMethod
isBridge
in interface IMethod
IMethod.isBridge()
public boolean isSynchronized()
IMethod
isSynchronized
in interface IMethod
IMethod.isAbstract()
public boolean isSynthetic()
IMethod
isSynthetic
in interface IMethod
IMethod.isSynthetic()
public MethodReference getReference()
getReference
in interface IMethod
IMethod.getReference()
public InducedCFG makeControlFlowGraph(SSAInstruction[] instructions)
InducedCFG
from an instruction array.
NOTE: SIDE EFFECT!!! ... nulls out phi instructions in the instruction array!public BytecodeStream getBytecodeStream() throws UnsupportedOperationException
UnsupportedOperationException
public int getMaxLocals() throws UnsupportedOperationException
UnsupportedOperationException
public int getMaxStackHeight() throws UnsupportedOperationException
UnsupportedOperationException
public IClass getDeclaringClass()
IMember
getDeclaringClass
in interface IMember
public boolean hasExceptionHandler()
hasExceptionHandler
in interface IMethod
public boolean hasPoison()
public String getPoison()
public byte getPoisonLevel()
@Deprecated public SSAInstruction[] getStatements(SSAOptions options)
public IR makeIR(Context context, SSAOptions options) throws UnimplementedError
context
- TODOoptions
- options governing IR conversionUnimplementedError
public TypeReference getParameterType(int i)
IMethod
getParameterType
in interface IMethod
public int getNumberOfParameters()
IMethod
getNumberOfParameters
in interface IMethod
IMethod.getNumberOfParameters()
public TypeReference[] getDeclaredExceptions() throws InvalidClassFileException
getDeclaredExceptions
in interface IMethod
InvalidClassFileException
public Atom getName()
public Descriptor getDescriptor()
IMethod
getDescriptor
in interface IMethod
public IMethod.SourcePosition getSourcePosition(int bcIndex) throws InvalidClassFileException
getSourcePosition
in interface IMethod
InvalidClassFileException
public IMethod.SourcePosition getParameterSourcePosition(int paramNum) throws InvalidClassFileException
getParameterSourcePosition
in interface IMethod
InvalidClassFileException
public int getLineNumber(int bcIndex)
getLineNumber
in interface IMethod
public boolean isFactoryMethod()
public String getSignature()
IMethod
getSignature
in interface IMethod
public Selector getSelector()
IMethod
getSelector
in interface IMethod
public String getLocalVariableName(int bcIndex, int localNumber)
getLocalVariableName
in interface IMethod
public boolean hasLocalVariableTable()
hasLocalVariableTable
in interface IMethod
public SSAInstruction[] getStatements()
public TypeReference getReturnType()
getReturnType
in interface IMethod
public IClassHierarchy getClassHierarchy()
getClassHierarchy
in interface IClassHierarchyDweller
public Collection<Annotation> getAnnotations()
IMember
getAnnotations
in interface IMember