|
Lombok.ast - v0.2.2 | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
public interface Node
| Method Summary | |
|---|---|
void |
accept(AstVisitor visitor)
|
Node |
addMessage(Message message)
|
Node |
copy()
|
boolean |
detach(Node child)
If the provided child node is a child of this node, the child/parent link will be deleted. |
List<Node> |
getChildren()
|
Node |
getGeneratedBy()
Returns the node that is responsible for generating this node. |
List<Message> |
getMessages()
|
Object |
getNativeNode()
Gets the associated "native" node. |
Node |
getParent()
|
Position |
getPosition()
|
PositionFactory |
getPositionFactory()
Gets the position factory associated with this node. |
boolean |
hasMessage(String key)
|
boolean |
hasParent()
|
boolean |
isGenerated()
Returns true if this node is generated (not actually present in the source). |
boolean |
replace(Node replacement)
Replaces this node with the replacement. |
boolean |
replaceChild(Node child,
Node replacement)
If the provided child node is a child of this node, the child/parent link will be deleted. |
void |
setNativeNode(Object node)
Sets the associated "native" node. |
Node |
setPosition(Position position)
|
void |
setPositionFactory(PositionFactory factory)
Sets the PositionFactory associated with nodes of this type. |
String |
toString()
|
void |
unparent()
Severs the child/parent link between this node and its parent. |
| Method Detail |
|---|
boolean isGenerated()
true if this node is generated (not actually present in the source).
Node getGeneratedBy()
null if this node is not generated.
boolean hasParent()
List<Node> getChildren()
boolean replaceChild(Node child,
Node replacement)
throws AstException
true if child was indeed a direct child of this node (it will have been replaced).
AstException - If the replacement is of the wrong type and the location for the replacement does not allow off-type assignments,
which is true for those nodes that only have an astName() method and not a rawName() method.boolean detach(Node child)
true if child was indeed a direct child of this node (it will have been detached).unparent()
boolean replace(Node replacement)
throws AstException
true if the node was indeed replaced. Replacement fails if this node has no parent.
AstException - If the replacement is of the wrong type and the location for the replacement does not allow off-type assignments,
which is true for those nodes that only have an astName() method and not a rawName() method.void unparent()
detach(Node)Node setPosition(Position position)
void accept(AstVisitor visitor)
Node copy()
String toString()
toString in class ObjectNode getParent()
Position getPosition()
Node addMessage(Message message)
boolean hasMessage(String key)
List<Message> getMessages()
Object getNativeNode()
PositionFactory
to lazily compute positions, or by a type resolver to perform type resolution
also using the native data structures.
void setNativeNode(Object node)
getNativeNode() for details.
node - the native node to associate with this Lombok AST nodePositionFactory getPositionFactory()
setPositionFactory(PositionFactory) for details
void setPositionFactory(PositionFactory factory)
PositionFactory associated with nodes of this type.
This allows the getPosition() method to lazily create Position
objects from the getNativeNode() instances. The native nodes
can be used for other purposes too, such as type resolution, but the
position factory is stored directly on the node such that it can make
the getPosition() method use it transparently without the client
needing to pass the node to an external helper
factory - the factory to use to get positions for the current node
|
Lombok.ast - v0.2.2 | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||