org.extendj.neobeaver.ast.Goal Maven / Gradle / Ivy
/* This file was generated with JastAdd2 (http://jastadd.org) version 2.3.2 */
package org.extendj.neobeaver.ast;
import org.extendj.neobeaver.Parser.SourcePosition;
import org.extendj.neobeaver.Parser.Symbol;
/**
* @ast node
* @declaredat /home/jesper/git/neobeaver/core/src/grammar/Grammar.ast:16
* @astdecl Goal : GDecl ::= ;
* @production Goal : {@link GDecl} ::= <Name:String>;
*/
public class Goal extends GDecl implements Cloneable {
/**
* @aspect Grammar
* @declaredat /home/jesper/git/neobeaver/core/src/grammar/Grammar.jrag:37
*/
public void accept(GVisitor vis) { vis.visit(this); }
/**
* @declaredat ASTNode:1
*/
public Goal() {
super();
}
/**
* Initializes the child array to the correct size.
* Initializes List and Opt nta children.
* @apilevel internal
* @ast method
* @declaredat ASTNode:10
*/
public void init$Children() {
}
/**
* @declaredat ASTNode:12
*/
@ASTNodeAnnotation.Constructor(
name = {"Name"},
type = {"String"},
kind = {"Token"}
)
public Goal(String p0) {
setName(p0);
}
/** @apilevel low-level
* @declaredat ASTNode:21
*/
protected int numChildren() {
return 0;
}
/** @apilevel internal
* @declaredat ASTNode:25
*/
public void flushAttrCache() {
super.flushAttrCache();
}
/** @apilevel internal
* @declaredat ASTNode:29
*/
public void flushCollectionCache() {
super.flushCollectionCache();
}
/** @apilevel internal
* @declaredat ASTNode:33
*/
public Goal clone() throws CloneNotSupportedException {
Goal node = (Goal) super.clone();
return node;
}
/** @apilevel internal
* @declaredat ASTNode:38
*/
public Goal copy() {
try {
Goal node = (Goal) clone();
node.parent = null;
if (children != null) {
node.children = (ASTNode[]) children.clone();
}
return node;
} catch (CloneNotSupportedException e) {
throw new Error("Error: clone not supported for " + getClass().getName());
}
}
/**
* Create a deep copy of the AST subtree at this node.
* The copy is dangling, i.e. has no parent.
* @return dangling copy of the subtree at this node
* @apilevel low-level
* @deprecated Please use treeCopy or treeCopyNoTransform instead
* @declaredat ASTNode:57
*/
@Deprecated
public Goal fullCopy() {
return treeCopyNoTransform();
}
/**
* Create a deep copy of the AST subtree at this node.
* The copy is dangling, i.e. has no parent.
* @return dangling copy of the subtree at this node
* @apilevel low-level
* @declaredat ASTNode:67
*/
public Goal treeCopyNoTransform() {
Goal tree = (Goal) copy();
if (children != null) {
for (int i = 0; i < children.length; ++i) {
ASTNode child = (ASTNode) children[i];
if (child != null) {
child = child.treeCopyNoTransform();
tree.setChild(child, i);
}
}
}
return tree;
}
/**
* 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.
* @return dangling copy of the subtree at this node
* @apilevel low-level
* @declaredat ASTNode:87
*/
public Goal treeCopy() {
Goal tree = (Goal) copy();
if (children != null) {
for (int i = 0; i < children.length; ++i) {
ASTNode child = (ASTNode) getChild(i);
if (child != null) {
child = child.treeCopy();
tree.setChild(child, i);
}
}
}
return tree;
}
/** @apilevel internal
* @declaredat ASTNode:101
*/
protected boolean is$Equal(ASTNode node) {
return super.is$Equal(node) && (tokenString_Name == ((Goal) node).tokenString_Name);
}
/**
* Replaces the lexeme Name.
* @param value The new value for the lexeme Name.
* @apilevel high-level
*/
public void setName(String value) {
tokenString_Name = value;
}
/** @apilevel internal
*/
protected String tokenString_Name;
/**
* Retrieves the value for the lexeme Name.
* @return The value for the lexeme Name.
* @apilevel high-level
*/
@ASTNodeAnnotation.Token(name="Name")
public String getName() {
return tokenString_Name != null ? tokenString_Name : "";
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy