Package org.extendj.neobeaver.ast
Class GComponent
- java.lang.Object
-
- org.extendj.neobeaver.ast.ASTNode<ASTNode>
-
- org.extendj.neobeaver.ast.GComponent
-
- All Implemented Interfaces:
java.lang.Cloneable,Parser.Symbol
public class GComponent extends ASTNode<ASTNode> implements java.lang.Cloneable
-
-
Field Summary
Fields Modifier and Type Field Description protected java.lang.StringtokenString_Nameprotected java.lang.StringtokenString_Quantifier-
Fields inherited from class org.extendj.neobeaver.ast.ASTNode
children, generatedWithCacheCycle, numChildren, parent
-
-
Constructor Summary
Constructors Constructor Description GComponent()GComponent(java.lang.String p0, Opt<ActionName> p1, java.lang.String p2)
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description GComponentclone()GComponentcopy()voidflushAttrCache()voidflushCollectionCache()GComponentfullCopy()Deprecated.Please use treeCopy or treeCopyNoTransform insteadActionNamegetActionName()Retrieves the (optional) ActionName child.Opt<ActionName>getActionNameOpt()Retrieves the optional node for the ActionName child.Opt<ActionName>getActionNameOptNoTransform()Retrieves the optional node for child ActionName.java.lang.StringgetName()Retrieves the value for the lexeme Name.java.lang.StringgetQuantifier()Retrieves the value for the lexeme Quantifier.booleanhasActionName()Check whether the optional ActionName child exists.voidinit$Children()Initializes the child array to the correct size.protected booleanis$Equal(ASTNode node)protected intnumChildren()voidsetActionName(ActionName node)Replaces the (optional) ActionName child.voidsetActionNameOpt(Opt<ActionName> opt)Replaces the optional node for the ActionName child.voidsetName(java.lang.String value)Replaces the lexeme Name.voidsetQuantifier(java.lang.String value)Replaces the lexeme Quantifier.GComponenttreeCopy()Create a deep copy of the AST subtree at this node.GComponenttreeCopyNoTransform()Create a deep copy of the AST subtree at this node.-
Methods inherited from class org.extendj.neobeaver.ast.ASTNode
accept, addChild, astChildIterator, astChildren, doFullTraversal, flushAttrAndCollectionCache, flushCache, flushTreeCache, getChild, getChildNoTransform, getIndexOfChild, getNumChild, getNumChildNoTransform, getParent, getPosition, insertChild, is$Equal, removeChild, resetState, rewrittenNode, setChild, setParent, setPosition, state
-
-
-
-
Constructor Detail
-
GComponent
public GComponent()
-
GComponent
@Constructor(name={"Name","ActionName","Quantifier"}, type={"String","Opt<ActionName>","String"}, kind={"Token","Opt","Token"}) public GComponent(java.lang.String p0, Opt<ActionName> p1, java.lang.String p2)
-
-
Method Detail
-
init$Children
public void init$Children()
Initializes the child array to the correct size. Initializes List and Opt nta children.- Overrides:
init$Childrenin classASTNode<ASTNode>
-
numChildren
protected int numChildren()
- Overrides:
numChildrenin classASTNode<ASTNode>
-
flushAttrCache
public void flushAttrCache()
- Overrides:
flushAttrCachein classASTNode<ASTNode>
-
flushCollectionCache
public void flushCollectionCache()
- Overrides:
flushCollectionCachein classASTNode<ASTNode>
-
clone
public GComponent clone() throws java.lang.CloneNotSupportedException
-
copy
public GComponent copy()
-
fullCopy
@Deprecated public GComponent fullCopy()
Deprecated.Please use treeCopy or treeCopyNoTransform insteadCreate a deep copy of the AST subtree at this node. The copy is dangling, i.e. has no parent.
-
treeCopyNoTransform
public GComponent treeCopyNoTransform()
Create a deep copy of the AST subtree at this node. The copy is dangling, i.e. has no parent.- Overrides:
treeCopyNoTransformin classASTNode<ASTNode>- Returns:
- dangling copy of the subtree at this node
-
treeCopy
public GComponent treeCopy()
Create a deep copy of the AST subtree at this node. The subtree of this node is traversed to trigger rewrites before copy. The copy is dangling, i.e. has no parent.
-
setName
public void setName(java.lang.String value)
Replaces the lexeme Name.- Parameters:
value- The new value for the lexeme Name.
-
getName
@Token(name="Name") public java.lang.String getName()
Retrieves the value for the lexeme Name.- Returns:
- The value for the lexeme Name.
-
setActionNameOpt
public void setActionNameOpt(Opt<ActionName> opt)
Replaces the optional node for the ActionName child. This is theOptnode containing the child ActionName, not the actual child!- Parameters:
opt- The new node to be used as the optional node for the ActionName child.
-
setActionName
public void setActionName(ActionName node)
Replaces the (optional) ActionName child.- Parameters:
node- The new node to be used as the ActionName child.
-
hasActionName
public boolean hasActionName()
Check whether the optional ActionName child exists.- Returns:
trueif the optional ActionName child exists,falseif it does not.
-
getActionName
public ActionName getActionName()
Retrieves the (optional) ActionName child.- Returns:
- The ActionName child, if it exists. Returns
nullotherwise.
-
getActionNameOpt
@OptChild(name="ActionName") public Opt<ActionName> getActionNameOpt()
Retrieves the optional node for the ActionName child. This is theOptnode containing the child ActionName, not the actual child!- Returns:
- The optional node for child the ActionName child.
-
getActionNameOptNoTransform
public Opt<ActionName> getActionNameOptNoTransform()
Retrieves the optional node for child ActionName. This is theOptnode containing the child ActionName, not the actual child!This method does not invoke AST transformations.
- Returns:
- The optional node for child ActionName.
-
setQuantifier
public void setQuantifier(java.lang.String value)
Replaces the lexeme Quantifier.- Parameters:
value- The new value for the lexeme Quantifier.
-
-