|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.glassfish.pfl.dynamic.codegen.impl.AttributedObjectBase
org.glassfish.pfl.dynamic.codegen.impl.NodeBase
public class NodeBase
Base class for implementing various kinds of Nodes in the AST. This mainly supports dynamic attributes. It also supports dynamic delegation to another node. Dynamic attributes not found in the current node will automatically be searched for in the delegate.
| Constructor Summary | |
|---|---|
NodeBase(Node parent)
|
|
| Method Summary | ||
|---|---|---|
void |
accept(Visitor visitor)
Accept the visitor and allow it to perform actions on this Node. |
|
|
copy(Class<T> cls)
Make a deep copy of this node. |
|
|
copy(Node newParent,
Class<T> cls)
Copy setting a new parent in the result. |
|
|
getAncestor(Class<T> type)
Return the first ancestor of this node of the given type, if any. |
|
int |
id()
Return the unique ID of this node. |
|
Node |
parent()
Return the Node that contains (and created) this Node. |
|
void |
parent(Node node)
Set the parent to a new value. |
|
void |
postCopy()
|
|
void |
preCopy()
|
|
String |
toString()
|
|
| Methods inherited from class org.glassfish.pfl.dynamic.codegen.impl.AttributedObjectBase |
|---|
attributes, get, set |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface org.glassfish.pfl.dynamic.codegen.impl.AttributedObject |
|---|
attributes, get, set |
| Constructor Detail |
|---|
public NodeBase(Node parent)
| Method Detail |
|---|
public void preCopy()
preCopy in interface CopyInterceptorpreCopy in class AttributedObjectBasepublic void postCopy()
postCopy in interface CopyInterceptorpostCopy in class AttributedObjectBasepublic final <T extends Node> T getAncestor(Class<T> type)
Node
getAncestor in interface Nodepublic int id()
Node
id in interface Nodepublic final Node parent()
Node
parent in interface Nodepublic final void parent(Node node)
Node
parent in interface Nodepublic <T extends Node> T copy(Class<T> cls)
Node
copy in interface Node
public <T extends Node> T copy(Node newParent,
Class<T> cls)
Node
copy in interface Nodepublic String toString()
toString in class Objectpublic void accept(Visitor visitor)
Node
accept in interface Node
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||