org.extendj.ast.SubstitutedBodyDecl Maven / Gradle / Ivy
/* This file was generated with JastAdd2 (http://jastadd.org) version 2.3.0 */
package org.extendj.ast;
import java.util.ArrayList;
import java.io.ByteArrayOutputStream;
import java.io.PrintStream;
import java.lang.reflect.InvocationTargetException;
import java.lang.reflect.Method;
import java.util.Collection;
import java.util.Collections;
import java.util.HashSet;
import java.io.File;
import java.io.FileNotFoundException;
import java.io.InputStream;
import java.io.IOException;
import java.util.Set;
import beaver.*;
import java.util.concurrent.atomic.AtomicBoolean;
import java.util.concurrent.ConcurrentMap;
import java.util.concurrent.ConcurrentHashMap;
import java.util.concurrent.ConcurrentSkipListMap;
import java.util.LinkedHashSet;
import java.util.*;
import org.jastadd.util.PrettyPrintable;
import org.jastadd.util.PrettyPrinter;
import java.util.zip.*;
import java.io.*;
import org.jastadd.util.*;
import java.io.BufferedInputStream;
import java.io.DataInputStream;
/**
* @ast node
* @declaredat /home/jesper/git/extendj/java5/grammar/Generics.ast:75
* @astdecl SubstitutedBodyDecl : BodyDecl ::= ;
* @production SubstitutedBodyDecl : {@link BodyDecl} ::= <Original:BodyDecl> <Parameterization:Parameterization>;
*/
public class SubstitutedBodyDecl extends BodyDecl implements Cloneable {
/**
* @declaredat ASTNode:1
*/
public SubstitutedBodyDecl() {
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 = {"Original", "Parameterization"},
type = {"BodyDecl", "Parameterization"},
kind = {"Token", "Token"}
)
public SubstitutedBodyDecl(BodyDecl p0, Parameterization p1) {
setOriginal(p0);
setParameterization(p1);
}
/** @apilevel low-level
* @declaredat ASTNode:22
*/
protected int numChildren() {
return 0;
}
/**
* @apilevel internal
* @declaredat ASTNode:28
*/
public boolean mayHaveRewrite() {
return false;
}
/** @apilevel internal
* @declaredat ASTNode:32
*/
public void flushAttrCache() {
super.flushAttrCache();
}
/** @apilevel internal
* @declaredat ASTNode:36
*/
public void flushCollectionCache() {
super.flushCollectionCache();
}
/** @apilevel internal
* @declaredat ASTNode:40
*/
public SubstitutedBodyDecl clone() throws CloneNotSupportedException {
SubstitutedBodyDecl node = (SubstitutedBodyDecl) super.clone();
return node;
}
/** @apilevel internal
* @declaredat ASTNode:45
*/
public SubstitutedBodyDecl copy() {
try {
SubstitutedBodyDecl node = (SubstitutedBodyDecl) 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:64
*/
@Deprecated
public SubstitutedBodyDecl 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:74
*/
public SubstitutedBodyDecl treeCopyNoTransform() {
SubstitutedBodyDecl tree = (SubstitutedBodyDecl) 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:94
*/
public SubstitutedBodyDecl treeCopy() {
SubstitutedBodyDecl tree = (SubstitutedBodyDecl) 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:108
*/
protected boolean is$Equal(ASTNode node) {
return super.is$Equal(node) && (tokenBodyDecl_Original == ((SubstitutedBodyDecl) node).tokenBodyDecl_Original) && (tokenParameterization_Parameterization == ((SubstitutedBodyDecl) node).tokenParameterization_Parameterization);
}
/**
* Replaces the lexeme Original.
* @param value The new value for the lexeme Original.
* @apilevel high-level
*/
public void setOriginal(BodyDecl value) {
tokenBodyDecl_Original = value;
}
/** @apilevel internal
*/
protected BodyDecl tokenBodyDecl_Original;
/**
* Retrieves the value for the lexeme Original.
* @return The value for the lexeme Original.
* @apilevel high-level
*/
@ASTNodeAnnotation.Token(name="Original")
public BodyDecl getOriginal() {
return tokenBodyDecl_Original;
}
/**
* Replaces the lexeme Parameterization.
* @param value The new value for the lexeme Parameterization.
* @apilevel high-level
*/
public void setParameterization(Parameterization value) {
tokenParameterization_Parameterization = value;
}
/** @apilevel internal
*/
protected Parameterization tokenParameterization_Parameterization;
/**
* Retrieves the value for the lexeme Parameterization.
* @return The value for the lexeme Parameterization.
* @apilevel high-level
*/
@ASTNodeAnnotation.Token(name="Parameterization")
public Parameterization getParameterization() {
return tokenParameterization_Parameterization;
}
/** @apilevel internal */
public ASTNode rewriteTo() {
return super.rewriteTo();
}
/** @apilevel internal */
public boolean canRewrite() {
return false;
}
}