Note
the hashCode of a ClassGeneratorImpl changes whenever a method, constructor, or field is added, so do not put ClassGenerators into sets or maps unless they are fully populated.
| Modifier and Type | Field and Description |
|---|---|
| private List | |
| private List | |
| private BlockStatement | |
| private List | |
| private Node |
| Access | Constructor and Description |
|---|---|
| pack-priv | ClassGeneratorImpl(int modifiers, String name, List<Type> impls)
Construct a ClassGeneratorImpl representing an interface. |
| pack-priv | ClassGeneratorImpl(int modifiers, String name, Type superType, List<Type> impls)
Construct a ClassGeneratorImpl representing a class. |
| Modifier and Type | Method and Description |
|---|---|
| public void | accept(Visitor visitor)
Implements org. Accept the visitor and allow it to perform actions on this Node. |
| public FieldGenerator | |
| public List | attributes()
Implements org. Internal method for dynamic attribute support. |
| public Set | |
| public List | |
| public <T extends Node> T | copy(Class<T> cls)
Implements org. Make a deep copy of this node. |
| public <T extends Node> T | copy(Node newParent, Class<T> cls)
Implements org. Copy setting a new parent in the result. |
| public List | |
| public Object | get(int index)
Implements org. Internal method for dynamic attribute support. |
| public <T extends Node> T | getAncestor(Class<T> type)
Implements org. Return the first ancestor of this node of the given type, if any. |
| public int | |
| public BlockStatement | |
| public void | |
| public List | |
| public Node | parent()
Implements org. Return the Node that contains (and created) this Node. |
| public void | parent(Node node)
Implements org. Set the parent to a new value. |
| public void | set(int index, Object obj)
Implements org. Internal method for dynamic attribute support. |
| public MethodGenerator | |
| public MethodGenerator |
| constructors | back to summary |
|---|---|
| private List<MethodGenerator> constructors Hides org. | |
| fields | back to summary |
|---|---|
| private List<FieldGenerator> fields Hides org. | |
| initializer | back to summary |
|---|---|
| private BlockStatement initializer | |
| methods | back to summary |
|---|---|
| private List<MethodGenerator> methods | |
| nodeImpl | back to summary |
|---|---|
| private Node nodeImpl | |
| ClassGeneratorImpl | back to summary |
|---|---|
| pack-priv ClassGeneratorImpl(int modifiers, String name, List<Type> impls) Construct a ClassGeneratorImpl representing an interface. | |
| ClassGeneratorImpl | back to summary |
|---|---|
| pack-priv ClassGeneratorImpl(int modifiers, String name, Type superType, List<Type> impls) Construct a ClassGeneratorImpl representing a class. | |
| accept | back to summary |
|---|---|
| public void accept(Visitor visitor) Implements org. Doc from org. Accept the visitor and allow it to perform actions on this Node. | |
| addField | back to summary |
|---|---|
| public FieldGenerator addField(int modifiers, Type type, String name) | |
| attributes | back to summary |
|---|---|
| public List Implements org. Doc from org. Internal method for dynamic attribute support. Return all attributes for this node (may be null). | |
| constructorInfo | back to summary |
|---|---|
| public Set Overrides org. Implements org. | |
| constructors | back to summary |
|---|---|
| public List | |
| copy | back to summary |
|---|---|
| public <T extends Node> T copy(Class<T> cls) Implements org. Doc from org. Make a deep copy of this node. If nn = n.copy(), then n.parent() == nn.parent(), which also means that the parent is NOT copied. | |
| copy | back to summary |
|---|---|
| public <T extends Node> T copy(Node newParent, Class<T> cls) Implements org. Doc from org. Copy setting a new parent in the result. | |
| fields | back to summary |
|---|---|
| public List | |
| get | back to summary |
|---|---|
| public Object get(int index) Implements org. Doc from org. Internal method for dynamic attribute support. Return the value of the attribute at index. If the attribute at index is not set, set it to the default value and return the default. | |
| getAncestor | back to summary |
|---|---|
| public <T extends Node> T getAncestor(Class<T> type) Implements org. Doc from org. Return the first ancestor of this node of the given type, if any. Throws IllegalArgumentException if not found. | |
| id | back to summary |
|---|---|
| public int id() Implements org. Doc from org. Return the unique ID of this node. This starts at 1 and is incremented for each new Node that is created. | |
| initializer | back to summary |
|---|---|
| public BlockStatement initializer() | |
| methodComplete | back to summary |
|---|---|
| public void methodComplete(MethodGenerator mg) | |
| methods | back to summary |
|---|---|
| public List | |
| parent | back to summary |
|---|---|
| public Node parent() Implements org. Doc from org. Return the Node that contains (and created) this Node. | |
| parent | back to summary |
|---|---|
| public void parent(Node node) Implements org. Doc from org. Set the parent to a new value. Should only be called inside NodeBase. | |
| set | back to summary |
|---|---|
| public void set(int index, Object obj) Implements org. Doc from org. Internal method for dynamic attribute support. Set the attribute at index to obj. | |
| startConstructor | back to summary |
|---|---|
| public MethodGenerator startConstructor(int modifiers, List<Type> exceptions) | |
| startMethod | back to summary |
|---|---|
| public MethodGenerator startMethod(int modifiers, Type rtype, String name, List<Type> exceptions) | |