
public class JMethodBody extends JAbstractMethodBody
method| Constructor and Description |
|---|
JMethodBody(SourceInfo info) |
| Modifier and Type | Method and Description |
|---|---|
void |
addLocal(JLocal local)
Adds a local to this method body.
|
JBlock |
getBlock() |
List<JLocal> |
getLocals()
Returns this method's local variables.
|
List<JStatement> |
getStatements() |
boolean |
isNative() |
void |
removeLocal(int index)
Removes a local from this method body.
|
void |
sortLocals(Comparator<? super JLocal> sort)
Sorts this method's locals according to the specified sort.
|
void |
traverse(JVisitor visitor,
Context ctx)
Causes this object to have the visitor visit itself and its children.
|
getMethod, setMethodgetSourceInfo, setSourceInfo, toSource, toStringpublic JMethodBody(SourceInfo info)
public void addLocal(JLocal local)
public JBlock getBlock()
public List<JStatement> getStatements()
public boolean isNative()
isNative in class JAbstractMethodBodypublic void removeLocal(int index)
public void sortLocals(Comparator<? super JLocal> sort)
public void traverse(JVisitor visitor, Context ctx)
JVisitablevisitor - the visitor that should traverse this nodectx - the context of an existing traversalCopyright © 2018. All rights reserved.