public final class MethodGenerator extends MethodInfoBase implements Node
arguments, exceptions, rtype| Modifier and Type | Method and Description |
|---|---|
void |
accept(Visitor visitor)
Accept the visitor and allow it to perform actions on this Node.
|
Variable |
addArgument(Type type,
String ident) |
void |
argsComplete() |
List<Object> |
attributes()
Internal method for dynamic attribute support.
|
BlockStatement |
body() |
<T extends Node> |
copy(Class<T> cls)
Make a deep copy of this node.
|
<T extends Node> |
copy(Node newParent,
Class<T> cls)
Copy setting a new parent in the result.
|
Object |
get(int index)
Internal method for dynamic attribute support.
|
<T extends Node> |
getAncestor(Class<T> type)
Return the first ancestor of this node of the given type, if any.
|
int |
hashCode() |
int |
id()
Return the unique ID of this node.
|
boolean |
isConstructor()
Returns true if this is a constructor, false if
method.
|
Node |
parent()
Return the Node that contains (and created) this Node.
|
void |
parent(Node node)
Set the parent to a new value.
|
void |
set(int index,
Object obj)
Internal method for dynamic attribute support.
|
arguments, clearHashCode, equals, exceptions, getConstructor, getMethod, returnType, signatureisAccessibleInContext, modifiers, myClassInfo, name, toStringclone, finalize, getClass, notify, notifyAll, wait, wait, waitisAccessibleInContext, modifiers, myClassInfo, namepublic BlockStatement body()
public Node parent()
Nodepublic int id()
Nodepublic void parent(Node node)
Nodepublic <T extends Node> T getAncestor(Class<T> type)
NodegetAncestor in interface Nodepublic <T extends Node> T copy(Class<T> cls)
Nodepublic <T extends Node> T copy(Node newParent, Class<T> cls)
Nodepublic Object get(int index)
AttributedObjectget in interface AttributedObjectpublic void set(int index,
Object obj)
AttributedObjectset in interface AttributedObjectpublic List<Object> attributes()
AttributedObjectattributes in interface AttributedObjectpublic boolean isConstructor()
MethodInfoisConstructor in interface MethodInfoisConstructor in class MethodInfoBasepublic void argsComplete()
public int hashCode()
hashCode in class MethodInfoBaseCopyright © 2017 Oracle. All rights reserved.