|
Lombok.ast - v0.2 | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectlombok.ast.ClassDeclaration
public class ClassDeclaration
| Constructor Summary | |
|---|---|
ClassDeclaration()
|
|
| Method Summary | |
|---|---|
void |
accept(AstVisitor visitor)
|
Node |
addMessage(Message message)
|
protected lombok.ast.AbstractNode |
adopt(lombok.ast.AbstractNode child)
Adopts (accepts as direct child) the provided node. |
NormalTypeBody |
astBody()
|
ClassDeclaration |
astBody(NormalTypeBody body)
|
TypeReference |
astExtending()
|
ClassDeclaration |
astExtending(TypeReference extending)
|
StrictListAccessor<TypeReference,ClassDeclaration> |
astImplementing()
|
Comment |
astJavadoc()
|
ClassDeclaration |
astJavadoc(Comment javadoc)
|
Modifiers |
astModifiers()
|
ClassDeclaration |
astModifiers(Modifiers modifiers)
|
Identifier |
astName()
|
ClassDeclaration |
astName(Identifier name)
|
StrictListAccessor<TypeVariable,ClassDeclaration> |
astTypeVariables()
|
ClassDeclaration |
copy()
|
boolean |
detach(Node child)
If the provided child node is a child of this node, the child/parent link will be deleted. |
protected void |
disown(lombok.ast.AbstractNode child)
Disowns a direct child (it will be parentless after this call). |
protected void |
ensureParentage(lombok.ast.AbstractNode child)
Checks if the provided node is a direct child of this node. |
protected void |
ensureParentless()
Checks if this node is currently parentless. |
List<Node> |
getChildren()
|
String |
getDescription()
A very short string that is particularly useful in describing this node. |
Node |
getGeneratedBy()
Returns the node that is responsible for generating this node. |
List<Message> |
getMessages()
|
boolean |
hasMessage(String key)
|
boolean |
hasParent()
|
boolean |
isGenerated()
Returns true if this node is generated (not actually present in the source). |
boolean |
isInterface()
|
Node |
rawBody()
|
ClassDeclaration |
rawBody(Node body)
|
Node |
rawExtending()
|
ClassDeclaration |
rawExtending(Node extending)
|
RawListAccessor<TypeReference,ClassDeclaration> |
rawImplementing()
|
Node |
rawJavadoc()
|
ClassDeclaration |
rawJavadoc(Node javadoc)
|
RawListAccessor<TypeVariable,ClassDeclaration> |
rawTypeVariables()
|
boolean |
replace(Node replacement)
Replaces this node with the replacement. |
boolean |
replaceChild(Node original,
Node replacement)
If the provided child node is a child of this node, the child/parent link will be deleted. |
Node |
setPosition(Position position)
|
String |
toString()
|
void |
unparent()
Severs the child/parent link between this node and its parent. |
CompilationUnit |
upIfTopLevelToCompilationUnit()
|
Block |
upToBlock()
|
TypeBody |
upToTypeBody()
|
TypeDeclaration |
upUpToTypeDeclaration()
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface lombok.ast.Node |
|---|
addMessage, getGeneratedBy, getMessages, getParent, getPosition, hasMessage, hasParent, isGenerated, replace, setPosition, toString, unparent |
| Constructor Detail |
|---|
public ClassDeclaration()
| Method Detail |
|---|
public TypeBody upToTypeBody()
upToTypeBody in interface TypeMemberpublic Block upToBlock()
upToBlock in interface StatementupToBlock in interface TypeDeclarationpublic CompilationUnit upIfTopLevelToCompilationUnit()
upIfTopLevelToCompilationUnit in interface TypeDeclarationpublic Comment astJavadoc()
astJavadoc in interface JavadocContainerastJavadoc in interface TypeDeclarationpublic ClassDeclaration astJavadoc(Comment javadoc)
astJavadoc in interface JavadocContainerastJavadoc in interface TypeDeclarationpublic Node rawJavadoc()
rawJavadoc in interface JavadocContainerrawJavadoc in interface TypeDeclarationpublic ClassDeclaration rawJavadoc(Node javadoc)
rawJavadoc in interface JavadocContainerrawJavadoc in interface TypeDeclarationpublic Modifiers astModifiers()
astModifiers in interface TypeDeclarationpublic ClassDeclaration astModifiers(Modifiers modifiers)
astModifiers in interface TypeDeclarationpublic Identifier astName()
astName in interface TypeDeclarationpublic ClassDeclaration astName(Identifier name)
astName in interface TypeDeclarationpublic RawListAccessor<TypeVariable,ClassDeclaration> rawTypeVariables()
public StrictListAccessor<TypeVariable,ClassDeclaration> astTypeVariables()
public TypeReference astExtending()
public ClassDeclaration astExtending(TypeReference extending)
public Node rawExtending()
public ClassDeclaration rawExtending(Node extending)
public RawListAccessor<TypeReference,ClassDeclaration> rawImplementing()
public StrictListAccessor<TypeReference,ClassDeclaration> astImplementing()
public NormalTypeBody astBody()
astBody in interface TypeDeclarationpublic ClassDeclaration astBody(NormalTypeBody body)
public Node rawBody()
rawBody in interface TypeDeclarationpublic ClassDeclaration rawBody(Node body)
public List<Node> getChildren()
getChildren in interface Node
public boolean replaceChild(Node original,
Node replacement)
throws AstException
Node
replaceChild in interface Nodetrue 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.public boolean detach(Node child)
Node
detach in interface Nodetrue if child was indeed a direct child of this node (it will have been detached).Node.unparent()public void accept(AstVisitor visitor)
accept in interface Nodepublic ClassDeclaration copy()
copy in interface Nodepublic String getDescription()
DescribedNodenull to indicate this particular instance has no useful name (usually, but not neccessarily, because it is not valid).
NB: This method should never throw an exception!
getDescription in interface DescribedNodepublic boolean isInterface()
isInterface in interface TypeDeclarationpublic TypeDeclaration upUpToTypeDeclaration()
public boolean isGenerated()
Nodetrue if this node is generated (not actually present in the source).
isGenerated in interface Nodepublic Node getGeneratedBy()
Nodenull if this node is not generated.
getGeneratedBy in interface Nodepublic boolean hasParent()
hasParent in interface Node
public boolean replace(Node replacement)
throws AstException
Node
replace in interface Nodetrue 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.public void unparent()
Node
unparent in interface NodeNode.detach(Node)
protected lombok.ast.AbstractNode adopt(lombok.ast.AbstractNode child)
throws IllegalStateException
child - The node to adopt
child parameter for chaining.
IllegalStateException - If child already has a parent (clone or unparent it first).
protected void ensureParentless()
throws IllegalStateException
IllegalStateException - if I have a parent.
protected void disown(lombok.ast.AbstractNode child)
throws IllegalStateException
child - Child node to disown
IllegalStateException - if child isn't a direct child of myself.
protected void ensureParentage(lombok.ast.AbstractNode child)
throws IllegalStateException
child - This node must be a direct child of myself.
IllegalStateException - If child isn't a direct child of myself.public Node setPosition(Position position)
setPosition in interface Nodepublic String toString()
toString in interface NodetoString in class Objectpublic Node addMessage(Message message)
addMessage in interface Nodepublic boolean hasMessage(String key)
hasMessage in interface Nodepublic List<Message> getMessages()
getMessages in interface Node
|
Lombok.ast - v0.2 | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||