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, setMethod
getSourceInfo, setSourceInfo, toSource, toString
public JMethodBody(SourceInfo info)
public void addLocal(JLocal local)
public JBlock getBlock()
public List<JStatement> getStatements()
public boolean isNative()
isNative
in class JAbstractMethodBody
public void removeLocal(int index)
public void sortLocals(Comparator<? super JLocal> sort)
public void traverse(JVisitor visitor, Context ctx)
JVisitable
visitor
- the visitor that should traverse this nodectx
- the context of an existing traversalCopyright © 2018. All rights reserved.