public class Method extends NonStatement
This AST element represents a Java method.
Retrieve a Method element using JebInstance.getDecompiledMethodTree
.
Methods can be created via the use of a Method.Builder
.
Note: Currently, methods are read-only elements.
Class
Modifier and Type | Class and Description |
---|---|
static class |
Method.Builder
This class is used to generate AST
Method elements. |
Constructor and Description |
---|
Method(java.lang.Object object)
Internal constructor, do not use.
|
Modifier and Type | Method and Description |
---|---|
Block |
getBody()
Get the body of the method.
|
Class |
getContainingClass()
Get a reference to the containing class AST element.
|
java.lang.String |
getName()
Get the method name.
|
java.util.List<Definition> |
getParameters()
Get the parameters of the method.
|
java.lang.String |
getSignature()
Get the method signature.
|
boolean |
isStatic()
Determine whether the method is a static method.
|
attachTag, getSubElements, replaceSubElement, retrieveTag
public Method(java.lang.Object object)
Internal constructor, do not use.
object
- opaque Method datapublic java.lang.String getName()
Get the method name.
public java.lang.String getSignature()
Get the method signature.
Format: classSignature->methodName(paramTypes)returnType
public java.util.List<Definition> getParameters()
Get the parameters of the method.
public Block getBody()
Get the body of the method.
public Class getContainingClass()
Get a reference to the containing class AST element.
public boolean isStatic()
Determine whether the method is a static method.