|
Lombok.ast - v0.2 | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectlombok.ast.ConstructorInvocation
public class ConstructorInvocation
| Constructor Summary | |
|---|---|
ConstructorInvocation()
|
|
| 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 |
astAnonymousClassBody()
|
ConstructorInvocation |
astAnonymousClassBody(NormalTypeBody anonymousClassBody)
|
StrictListAccessor<Expression,ConstructorInvocation> |
astArguments()
|
StrictListAccessor<TypeReference,ConstructorInvocation> |
astConstructorTypeArguments()
|
List<Position> |
astParensPositions()
Returns the start/end position of each paren pair around this node. |
Expression |
astQualifier()
|
ConstructorInvocation |
astQualifier(Expression qualifier)
|
TypeReference |
astTypeReference()
|
ConstructorInvocation |
astTypeReference(TypeReference typeReference)
|
ConstructorInvocation |
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. |
int |
getIntendedParens()
Returns the same value as Expression.getParens(), unless that method returns 0,
and Expression.needsParentheses() is true, then this method returns 1. |
List<Message> |
getMessages()
|
int |
getParens()
Returns the actual amount of parentheses physically around this expression. |
boolean |
hasMessage(String key)
|
boolean |
hasParent()
|
boolean |
isGenerated()
Returns true if this node is generated (not actually present in the source). |
boolean |
isStatementExpression()
Returns true if the given expression is a valid statement expression. |
boolean |
needsParentheses()
Returns true if the expression would need parentheses because without them the interpretation
of this node would be different, due to operator precedence rules. |
Node |
rawAnonymousClassBody()
|
ConstructorInvocation |
rawAnonymousClassBody(Node anonymousClassBody)
|
RawListAccessor<Expression,ConstructorInvocation> |
rawArguments()
|
RawListAccessor<TypeReference,ConstructorInvocation> |
rawConstructorTypeArguments()
|
Node |
rawQualifier()
|
ConstructorInvocation |
rawQualifier(Node qualifier)
|
Node |
rawTypeReference()
|
ConstructorInvocation |
rawTypeReference(Node typeReference)
|
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. |
| 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 ConstructorInvocation()
| Method Detail |
|---|
public List<Position> astParensPositions()
Expression
astParensPositions in interface ExpressionExpression.getParens()public Expression astQualifier()
public ConstructorInvocation astQualifier(Expression qualifier)
public Node rawQualifier()
public ConstructorInvocation rawQualifier(Node qualifier)
public RawListAccessor<TypeReference,ConstructorInvocation> rawConstructorTypeArguments()
public StrictListAccessor<TypeReference,ConstructorInvocation> astConstructorTypeArguments()
public TypeReference astTypeReference()
public ConstructorInvocation astTypeReference(TypeReference typeReference)
public Node rawTypeReference()
public ConstructorInvocation rawTypeReference(Node typeReference)
public RawListAccessor<Expression,ConstructorInvocation> rawArguments()
public StrictListAccessor<Expression,ConstructorInvocation> astArguments()
public NormalTypeBody astAnonymousClassBody()
public ConstructorInvocation astAnonymousClassBody(NormalTypeBody anonymousClassBody)
public Node rawAnonymousClassBody()
public ConstructorInvocation rawAnonymousClassBody(Node anonymousClassBody)
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 ConstructorInvocation 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 int getParens()
Expression
getParens in interface ExpressionExpression.astParensPositions(),
Expression.getIntendedParens()public int getIntendedParens()
ExpressionExpression.getParens(), unless that method returns 0,
and Expression.needsParentheses() is true, then this method returns 1.
getIntendedParens in interface Expressionpublic boolean needsParentheses()
Expressiontrue if the expression would need parentheses because without them the interpretation
of this node would be different, due to operator precedence rules.
needsParentheses in interface ExpressionExpression.getIntendedParens()public boolean isStatementExpression()
Expression
isStatementExpression in interface Expressionpublic 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 | ||||||||