org.extendj.ast.ParConstructorDecl 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/GenericMethods.ast:10
* @astdecl ParConstructorDecl : ConstructorDecl ::= TypeArgument:Access* TypeParameter:TypeVariable* ;
* @production ParConstructorDecl : {@link ConstructorDecl} ::= TypeArgument:{@link Access}* <GenericConstructorDecl:GenericConstructorDecl> TypeParameter:{@link TypeVariable}* <Parameterization:Parameterization>;
*/
public class ParConstructorDecl extends ConstructorDecl implements Cloneable {
/**
* @aspect LookupParTypeDecl
* @declaredat /home/jesper/git/extendj/java5/frontend/Generics.jrag:1269
*/
public boolean isRawType() {
return false;
}
/**
* @aspect LookupParTypeDecl
* @declaredat /home/jesper/git/extendj/java5/frontend/Generics.jrag:1285
*/
public int numTypeParameter() {
return genericConstructorDecl().original().getNumTypeParameter();
}
/**
* @aspect LookupParTypeDecl
* @declaredat /home/jesper/git/extendj/java5/frontend/Generics.jrag:1293
*/
public TypeVariable typeParameter(int index) {
return genericConstructorDecl().original().getTypeParameter(index);
}
/**
* @aspect GenericsCodegen
* @declaredat /home/jesper/git/extendj/java5/backend/GenericsCodegen.jrag:243
*/
public void emitInvokeConstructor(CodeGeneration gen) {
genericConstructorDecl().emitInvokeConstructor(gen);
}
/**
* @declaredat ASTNode:1
*/
public ParConstructorDecl() {
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() {
children = new ASTNode[8];
setChild(new List(), 1);
setChild(new List(), 2);
setChild(new Opt(), 3);
setChild(new List(), 5);
setChild(new List(), 6);
}
/**
* @declaredat ASTNode:18
*/
@ASTNodeAnnotation.Constructor(
name = {"Modifiers", "ID", "Parameter", "Exception", "ParsedConstructorInvocation", "Block", "TypeArgument", "GenericConstructorDecl", "TypeParameter", "Parameterization"},
type = {"Modifiers", "String", "List", "List", "Opt", "Block", "List", "GenericConstructorDecl", "List", "Parameterization"},
kind = {"Child", "Token", "List", "List", "Opt", "Child", "List", "Token", "List", "Token"}
)
public ParConstructorDecl(Modifiers p0, String p1, List p2, List p3, Opt p4, Block p5, List p6, GenericConstructorDecl p7, List p8, Parameterization p9) {
setChild(p0, 0);
setID(p1);
setChild(p2, 1);
setChild(p3, 2);
setChild(p4, 3);
setChild(p5, 4);
setChild(p6, 5);
setGenericConstructorDecl(p7);
setChild(p8, 6);
setParameterization(p9);
}
/**
* @declaredat ASTNode:35
*/
public ParConstructorDecl(Modifiers p0, beaver.Symbol p1, List p2, List p3, Opt p4, Block p5, List p6, GenericConstructorDecl p7, List p8, Parameterization p9) {
setChild(p0, 0);
setID(p1);
setChild(p2, 1);
setChild(p3, 2);
setChild(p4, 3);
setChild(p5, 4);
setChild(p6, 5);
setGenericConstructorDecl(p7);
setChild(p8, 6);
setParameterization(p9);
}
/** @apilevel low-level
* @declaredat ASTNode:48
*/
protected int numChildren() {
return 7;
}
/**
* @apilevel internal
* @declaredat ASTNode:54
*/
public boolean mayHaveRewrite() {
return false;
}
/** @apilevel internal
* @declaredat ASTNode:58
*/
public void flushAttrCache() {
super.flushAttrCache();
genericConstructorDecl_reset();
sourceConstructorDecl_reset();
}
/** @apilevel internal
* @declaredat ASTNode:64
*/
public void flushCollectionCache() {
super.flushCollectionCache();
}
/** @apilevel internal
* @declaredat ASTNode:68
*/
public ParConstructorDecl clone() throws CloneNotSupportedException {
ParConstructorDecl node = (ParConstructorDecl) super.clone();
return node;
}
/** @apilevel internal
* @declaredat ASTNode:73
*/
public ParConstructorDecl copy() {
try {
ParConstructorDecl node = (ParConstructorDecl) 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:92
*/
@Deprecated
public ParConstructorDecl 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:102
*/
public ParConstructorDecl treeCopyNoTransform() {
ParConstructorDecl tree = (ParConstructorDecl) copy();
if (children != null) {
for (int i = 0; i < children.length; ++i) {
switch (i) {
case 7:
tree.children[i] = null;
continue;
}
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:127
*/
public ParConstructorDecl treeCopy() {
ParConstructorDecl tree = (ParConstructorDecl) copy();
if (children != null) {
for (int i = 0; i < children.length; ++i) {
switch (i) {
case 7:
tree.children[i] = null;
continue;
}
ASTNode child = (ASTNode) getChild(i);
if (child != null) {
child = child.treeCopy();
tree.setChild(child, i);
}
}
}
return tree;
}
/** @apilevel internal
* @declaredat ASTNode:146
*/
protected boolean is$Equal(ASTNode node) {
return super.is$Equal(node) && (tokenString_ID == ((ParConstructorDecl) node).tokenString_ID) && (tokenGenericConstructorDecl_GenericConstructorDecl == ((ParConstructorDecl) node).tokenGenericConstructorDecl_GenericConstructorDecl) && (tokenParameterization_Parameterization == ((ParConstructorDecl) node).tokenParameterization_Parameterization);
}
/**
* Replaces the Modifiers child.
* @param node The new node to replace the Modifiers child.
* @apilevel high-level
*/
public void setModifiers(Modifiers node) {
setChild(node, 0);
}
/**
* Retrieves the Modifiers child.
* @return The current node used as the Modifiers child.
* @apilevel high-level
*/
@ASTNodeAnnotation.Child(name="Modifiers")
public Modifiers getModifiers() {
return (Modifiers) getChild(0);
}
/**
* Retrieves the Modifiers child.
* This method does not invoke AST transformations.
* @return The current node used as the Modifiers child.
* @apilevel low-level
*/
public Modifiers getModifiersNoTransform() {
return (Modifiers) getChildNoTransform(0);
}
/**
* Replaces the lexeme ID.
* @param value The new value for the lexeme ID.
* @apilevel high-level
*/
public void setID(String value) {
tokenString_ID = value;
}
/**
* JastAdd-internal setter for lexeme ID using the Beaver parser.
* @param symbol Symbol containing the new value for the lexeme ID
* @apilevel internal
*/
public void setID(beaver.Symbol symbol) {
if (symbol.value != null && !(symbol.value instanceof String))
throw new UnsupportedOperationException("setID is only valid for String lexemes");
tokenString_ID = (String)symbol.value;
IDstart = symbol.getStart();
IDend = symbol.getEnd();
}
/**
* Retrieves the value for the lexeme ID.
* @return The value for the lexeme ID.
* @apilevel high-level
*/
@ASTNodeAnnotation.Token(name="ID")
public String getID() {
return tokenString_ID != null ? tokenString_ID : "";
}
/**
* Replaces the Parameter list.
* @param list The new list node to be used as the Parameter list.
* @apilevel high-level
*/
public void setParameterList(List list) {
setChild(list, 1);
}
/**
* Retrieves the number of children in the Parameter list.
* @return Number of children in the Parameter list.
* @apilevel high-level
*/
public int getNumParameter() {
return getParameterList().getNumChild();
}
/**
* Retrieves the number of children in the Parameter list.
* Calling this method will not trigger rewrites.
* @return Number of children in the Parameter list.
* @apilevel low-level
*/
public int getNumParameterNoTransform() {
return getParameterListNoTransform().getNumChildNoTransform();
}
/**
* Retrieves the element at index {@code i} in the Parameter list.
* @param i Index of the element to return.
* @return The element at position {@code i} in the Parameter list.
* @apilevel high-level
*/
public ParameterDeclaration getParameter(int i) {
return (ParameterDeclaration) getParameterList().getChild(i);
}
/**
* Check whether the Parameter list has any children.
* @return {@code true} if it has at least one child, {@code false} otherwise.
* @apilevel high-level
*/
public boolean hasParameter() {
return getParameterList().getNumChild() != 0;
}
/**
* Append an element to the Parameter list.
* @param node The element to append to the Parameter list.
* @apilevel high-level
*/
public void addParameter(ParameterDeclaration node) {
List list = (parent == null) ? getParameterListNoTransform() : getParameterList();
list.addChild(node);
}
/** @apilevel low-level
*/
public void addParameterNoTransform(ParameterDeclaration node) {
List list = getParameterListNoTransform();
list.addChild(node);
}
/**
* Replaces the Parameter list element at index {@code i} with the new node {@code node}.
* @param node The new node to replace the old list element.
* @param i The list index of the node to be replaced.
* @apilevel high-level
*/
public void setParameter(ParameterDeclaration node, int i) {
List list = getParameterList();
list.setChild(node, i);
}
/**
* Retrieves the Parameter list.
* @return The node representing the Parameter list.
* @apilevel high-level
*/
@ASTNodeAnnotation.ListChild(name="Parameter")
public List getParameterList() {
List list = (List) getChild(1);
return list;
}
/**
* Retrieves the Parameter list.
* This method does not invoke AST transformations.
* @return The node representing the Parameter list.
* @apilevel low-level
*/
public List getParameterListNoTransform() {
return (List) getChildNoTransform(1);
}
/**
* @return the element at index {@code i} in the Parameter list without
* triggering rewrites.
*/
public ParameterDeclaration getParameterNoTransform(int i) {
return (ParameterDeclaration) getParameterListNoTransform().getChildNoTransform(i);
}
/**
* Retrieves the Parameter list.
* @return The node representing the Parameter list.
* @apilevel high-level
*/
public List getParameters() {
return getParameterList();
}
/**
* Retrieves the Parameter list.
* This method does not invoke AST transformations.
* @return The node representing the Parameter list.
* @apilevel low-level
*/
public List getParametersNoTransform() {
return getParameterListNoTransform();
}
/**
* Replaces the Exception list.
* @param list The new list node to be used as the Exception list.
* @apilevel high-level
*/
public void setExceptionList(List list) {
setChild(list, 2);
}
/**
* Retrieves the number of children in the Exception list.
* @return Number of children in the Exception list.
* @apilevel high-level
*/
public int getNumException() {
return getExceptionList().getNumChild();
}
/**
* Retrieves the number of children in the Exception list.
* Calling this method will not trigger rewrites.
* @return Number of children in the Exception list.
* @apilevel low-level
*/
public int getNumExceptionNoTransform() {
return getExceptionListNoTransform().getNumChildNoTransform();
}
/**
* Retrieves the element at index {@code i} in the Exception list.
* @param i Index of the element to return.
* @return The element at position {@code i} in the Exception list.
* @apilevel high-level
*/
public Access getException(int i) {
return (Access) getExceptionList().getChild(i);
}
/**
* Check whether the Exception list has any children.
* @return {@code true} if it has at least one child, {@code false} otherwise.
* @apilevel high-level
*/
public boolean hasException() {
return getExceptionList().getNumChild() != 0;
}
/**
* Append an element to the Exception list.
* @param node The element to append to the Exception list.
* @apilevel high-level
*/
public void addException(Access node) {
List list = (parent == null) ? getExceptionListNoTransform() : getExceptionList();
list.addChild(node);
}
/** @apilevel low-level
*/
public void addExceptionNoTransform(Access node) {
List list = getExceptionListNoTransform();
list.addChild(node);
}
/**
* Replaces the Exception list element at index {@code i} with the new node {@code node}.
* @param node The new node to replace the old list element.
* @param i The list index of the node to be replaced.
* @apilevel high-level
*/
public void setException(Access node, int i) {
List list = getExceptionList();
list.setChild(node, i);
}
/**
* Retrieves the Exception list.
* @return The node representing the Exception list.
* @apilevel high-level
*/
@ASTNodeAnnotation.ListChild(name="Exception")
public List getExceptionList() {
List list = (List) getChild(2);
return list;
}
/**
* Retrieves the Exception list.
* This method does not invoke AST transformations.
* @return The node representing the Exception list.
* @apilevel low-level
*/
public List getExceptionListNoTransform() {
return (List) getChildNoTransform(2);
}
/**
* @return the element at index {@code i} in the Exception list without
* triggering rewrites.
*/
public Access getExceptionNoTransform(int i) {
return (Access) getExceptionListNoTransform().getChildNoTransform(i);
}
/**
* Retrieves the Exception list.
* @return The node representing the Exception list.
* @apilevel high-level
*/
public List getExceptions() {
return getExceptionList();
}
/**
* Retrieves the Exception list.
* This method does not invoke AST transformations.
* @return The node representing the Exception list.
* @apilevel low-level
*/
public List getExceptionsNoTransform() {
return getExceptionListNoTransform();
}
/**
* Replaces the optional node for the ParsedConstructorInvocation child. This is the Opt
* node containing the child ParsedConstructorInvocation, not the actual child!
* @param opt The new node to be used as the optional node for the ParsedConstructorInvocation child.
* @apilevel low-level
*/
public void setParsedConstructorInvocationOpt(Opt opt) {
setChild(opt, 3);
}
/**
* Replaces the (optional) ParsedConstructorInvocation child.
* @param node The new node to be used as the ParsedConstructorInvocation child.
* @apilevel high-level
*/
public void setParsedConstructorInvocation(Stmt node) {
getParsedConstructorInvocationOpt().setChild(node, 0);
}
/**
* Check whether the optional ParsedConstructorInvocation child exists.
* @return {@code true} if the optional ParsedConstructorInvocation child exists, {@code false} if it does not.
* @apilevel high-level
*/
public boolean hasParsedConstructorInvocation() {
return getParsedConstructorInvocationOpt().getNumChild() != 0;
}
/**
* Retrieves the (optional) ParsedConstructorInvocation child.
* @return The ParsedConstructorInvocation child, if it exists. Returns {@code null} otherwise.
* @apilevel low-level
*/
public Stmt getParsedConstructorInvocation() {
return (Stmt) getParsedConstructorInvocationOpt().getChild(0);
}
/**
* Retrieves the optional node for the ParsedConstructorInvocation child. This is the Opt
node containing the child ParsedConstructorInvocation, not the actual child!
* @return The optional node for child the ParsedConstructorInvocation child.
* @apilevel low-level
*/
@ASTNodeAnnotation.OptChild(name="ParsedConstructorInvocation")
public Opt getParsedConstructorInvocationOpt() {
return (Opt) getChild(3);
}
/**
* Retrieves the optional node for child ParsedConstructorInvocation. This is the Opt
node containing the child ParsedConstructorInvocation, not the actual child!
* This method does not invoke AST transformations.
* @return The optional node for child ParsedConstructorInvocation.
* @apilevel low-level
*/
public Opt getParsedConstructorInvocationOptNoTransform() {
return (Opt) getChildNoTransform(3);
}
/**
* Replaces the Block child.
* @param node The new node to replace the Block child.
* @apilevel high-level
*/
public void setBlock(Block node) {
setChild(node, 4);
}
/**
* Retrieves the Block child.
* @return The current node used as the Block child.
* @apilevel high-level
*/
@ASTNodeAnnotation.Child(name="Block")
public Block getBlock() {
return (Block) getChild(4);
}
/**
* Retrieves the Block child.
* This method does not invoke AST transformations.
* @return The current node used as the Block child.
* @apilevel low-level
*/
public Block getBlockNoTransform() {
return (Block) getChildNoTransform(4);
}
/**
* Replaces the TypeArgument list.
* @param list The new list node to be used as the TypeArgument list.
* @apilevel high-level
*/
public void setTypeArgumentList(List list) {
setChild(list, 5);
}
/**
* Retrieves the number of children in the TypeArgument list.
* @return Number of children in the TypeArgument list.
* @apilevel high-level
*/
public int getNumTypeArgument() {
return getTypeArgumentList().getNumChild();
}
/**
* Retrieves the number of children in the TypeArgument list.
* Calling this method will not trigger rewrites.
* @return Number of children in the TypeArgument list.
* @apilevel low-level
*/
public int getNumTypeArgumentNoTransform() {
return getTypeArgumentListNoTransform().getNumChildNoTransform();
}
/**
* Retrieves the element at index {@code i} in the TypeArgument list.
* @param i Index of the element to return.
* @return The element at position {@code i} in the TypeArgument list.
* @apilevel high-level
*/
public Access getTypeArgument(int i) {
return (Access) getTypeArgumentList().getChild(i);
}
/**
* Check whether the TypeArgument list has any children.
* @return {@code true} if it has at least one child, {@code false} otherwise.
* @apilevel high-level
*/
public boolean hasTypeArgument() {
return getTypeArgumentList().getNumChild() != 0;
}
/**
* Append an element to the TypeArgument list.
* @param node The element to append to the TypeArgument list.
* @apilevel high-level
*/
public void addTypeArgument(Access node) {
List list = (parent == null) ? getTypeArgumentListNoTransform() : getTypeArgumentList();
list.addChild(node);
}
/** @apilevel low-level
*/
public void addTypeArgumentNoTransform(Access node) {
List list = getTypeArgumentListNoTransform();
list.addChild(node);
}
/**
* Replaces the TypeArgument list element at index {@code i} with the new node {@code node}.
* @param node The new node to replace the old list element.
* @param i The list index of the node to be replaced.
* @apilevel high-level
*/
public void setTypeArgument(Access node, int i) {
List list = getTypeArgumentList();
list.setChild(node, i);
}
/**
* Retrieves the TypeArgument list.
* @return The node representing the TypeArgument list.
* @apilevel high-level
*/
@ASTNodeAnnotation.ListChild(name="TypeArgument")
public List getTypeArgumentList() {
List list = (List) getChild(5);
return list;
}
/**
* Retrieves the TypeArgument list.
* This method does not invoke AST transformations.
* @return The node representing the TypeArgument list.
* @apilevel low-level
*/
public List getTypeArgumentListNoTransform() {
return (List) getChildNoTransform(5);
}
/**
* @return the element at index {@code i} in the TypeArgument list without
* triggering rewrites.
*/
public Access getTypeArgumentNoTransform(int i) {
return (Access) getTypeArgumentListNoTransform().getChildNoTransform(i);
}
/**
* Retrieves the TypeArgument list.
* @return The node representing the TypeArgument list.
* @apilevel high-level
*/
public List getTypeArguments() {
return getTypeArgumentList();
}
/**
* Retrieves the TypeArgument list.
* This method does not invoke AST transformations.
* @return The node representing the TypeArgument list.
* @apilevel low-level
*/
public List getTypeArgumentsNoTransform() {
return getTypeArgumentListNoTransform();
}
/**
* Replaces the lexeme GenericConstructorDecl.
* @param value The new value for the lexeme GenericConstructorDecl.
* @apilevel high-level
*/
public void setGenericConstructorDecl(GenericConstructorDecl value) {
tokenGenericConstructorDecl_GenericConstructorDecl = value;
}
/** @apilevel internal
*/
protected GenericConstructorDecl tokenGenericConstructorDecl_GenericConstructorDecl;
/**
* Retrieves the value for the lexeme GenericConstructorDecl.
* @return The value for the lexeme GenericConstructorDecl.
* @apilevel high-level
*/
@ASTNodeAnnotation.Token(name="GenericConstructorDecl")
public GenericConstructorDecl getGenericConstructorDecl() {
return tokenGenericConstructorDecl_GenericConstructorDecl;
}
/**
* Replaces the TypeParameter list.
* @param list The new list node to be used as the TypeParameter list.
* @apilevel high-level
*/
public void setTypeParameterList(List list) {
setChild(list, 6);
}
/**
* Retrieves the number of children in the TypeParameter list.
* @return Number of children in the TypeParameter list.
* @apilevel high-level
*/
public int getNumTypeParameter() {
return getTypeParameterList().getNumChild();
}
/**
* Retrieves the number of children in the TypeParameter list.
* Calling this method will not trigger rewrites.
* @return Number of children in the TypeParameter list.
* @apilevel low-level
*/
public int getNumTypeParameterNoTransform() {
return getTypeParameterListNoTransform().getNumChildNoTransform();
}
/**
* Retrieves the element at index {@code i} in the TypeParameter list.
* @param i Index of the element to return.
* @return The element at position {@code i} in the TypeParameter list.
* @apilevel high-level
*/
public TypeVariable getTypeParameter(int i) {
return (TypeVariable) getTypeParameterList().getChild(i);
}
/**
* Check whether the TypeParameter list has any children.
* @return {@code true} if it has at least one child, {@code false} otherwise.
* @apilevel high-level
*/
public boolean hasTypeParameter() {
return getTypeParameterList().getNumChild() != 0;
}
/**
* Append an element to the TypeParameter list.
* @param node The element to append to the TypeParameter list.
* @apilevel high-level
*/
public void addTypeParameter(TypeVariable node) {
List list = (parent == null) ? getTypeParameterListNoTransform() : getTypeParameterList();
list.addChild(node);
}
/** @apilevel low-level
*/
public void addTypeParameterNoTransform(TypeVariable node) {
List list = getTypeParameterListNoTransform();
list.addChild(node);
}
/**
* Replaces the TypeParameter list element at index {@code i} with the new node {@code node}.
* @param node The new node to replace the old list element.
* @param i The list index of the node to be replaced.
* @apilevel high-level
*/
public void setTypeParameter(TypeVariable node, int i) {
List list = getTypeParameterList();
list.setChild(node, i);
}
/**
* Retrieves the TypeParameter list.
* @return The node representing the TypeParameter list.
* @apilevel high-level
*/
@ASTNodeAnnotation.ListChild(name="TypeParameter")
public List getTypeParameterList() {
List list = (List) getChild(6);
return list;
}
/**
* Retrieves the TypeParameter list.
* This method does not invoke AST transformations.
* @return The node representing the TypeParameter list.
* @apilevel low-level
*/
public List getTypeParameterListNoTransform() {
return (List) getChildNoTransform(6);
}
/**
* @return the element at index {@code i} in the TypeParameter list without
* triggering rewrites.
*/
public TypeVariable getTypeParameterNoTransform(int i) {
return (TypeVariable) getTypeParameterListNoTransform().getChildNoTransform(i);
}
/**
* Retrieves the TypeParameter list.
* @return The node representing the TypeParameter list.
* @apilevel high-level
*/
public List getTypeParameters() {
return getTypeParameterList();
}
/**
* Retrieves the TypeParameter list.
* This method does not invoke AST transformations.
* @return The node representing the TypeParameter list.
* @apilevel low-level
*/
public List getTypeParametersNoTransform() {
return getTypeParameterListNoTransform();
}
/**
* 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;
}
/**
* Retrieves the ImplicitConstructorInvocation child.
* This method does not invoke AST transformations.
* @return The current node used as the ImplicitConstructorInvocation child.
* @apilevel low-level
*/
public Stmt getImplicitConstructorInvocationNoTransform() {
return (Stmt) getChildNoTransform(7);
}
/**
* Retrieves the child position of the optional child ImplicitConstructorInvocation.
* @return The the child position of the optional child ImplicitConstructorInvocation.
* @apilevel low-level
*/
protected int getImplicitConstructorInvocationChildPosition() {
return 7;
}
/** @apilevel internal */
private void genericConstructorDecl_reset() {
genericConstructorDecl_computed = null;
genericConstructorDecl_value = null;
}
/** @apilevel internal */
protected ASTState.Cycle genericConstructorDecl_computed = null;
/** @apilevel internal */
protected GenericConstructorDecl genericConstructorDecl_value;
/**
* @attribute syn
* @aspect GenericMethods
* @declaredat /home/jesper/git/extendj/java5/frontend/GenericMethods.jrag:54
*/
@ASTNodeAnnotation.Attribute(kind=ASTNodeAnnotation.Kind.SYN)
@ASTNodeAnnotation.Source(aspect="GenericMethods", declaredAt="/home/jesper/git/extendj/java5/frontend/GenericMethods.jrag:54")
public GenericConstructorDecl genericConstructorDecl() {
ASTState state = state();
if (genericConstructorDecl_computed == ASTState.NON_CYCLE || genericConstructorDecl_computed == state().cycle()) {
return genericConstructorDecl_value;
}
genericConstructorDecl_value = getGenericConstructorDecl();
if (state().inCircle()) {
genericConstructorDecl_computed = state().cycle();
} else {
genericConstructorDecl_computed = ASTState.NON_CYCLE;
}
return genericConstructorDecl_value;
}
/** @apilevel internal */
private void sourceConstructorDecl_reset() {
sourceConstructorDecl_computed = null;
sourceConstructorDecl_value = null;
}
/** @apilevel internal */
protected ASTState.Cycle sourceConstructorDecl_computed = null;
/** @apilevel internal */
protected ConstructorDecl sourceConstructorDecl_value;
/**
* @attribute syn
* @aspect SourceDeclarations
* @declaredat /home/jesper/git/extendj/java5/frontend/Generics.jrag:1913
*/
@ASTNodeAnnotation.Attribute(kind=ASTNodeAnnotation.Kind.SYN)
@ASTNodeAnnotation.Source(aspect="SourceDeclarations", declaredAt="/home/jesper/git/extendj/java5/frontend/Generics.jrag:1913")
public ConstructorDecl sourceConstructorDecl() {
ASTState state = state();
if (sourceConstructorDecl_computed == ASTState.NON_CYCLE || sourceConstructorDecl_computed == state().cycle()) {
return sourceConstructorDecl_value;
}
sourceConstructorDecl_value = genericConstructorDecl().original().sourceConstructorDecl();
if (state().inCircle()) {
sourceConstructorDecl_computed = state().cycle();
} else {
sourceConstructorDecl_computed = ASTState.NON_CYCLE;
}
return sourceConstructorDecl_value;
}
/**
* The constructor that is called in bytecode.
* @attribute syn
* @aspect CreateBCode
* @declaredat /home/jesper/git/extendj/java4/backend/CreateBCode.jrag:951
*/
@ASTNodeAnnotation.Attribute(kind=ASTNodeAnnotation.Kind.SYN)
@ASTNodeAnnotation.Source(aspect="CreateBCode", declaredAt="/home/jesper/git/extendj/java4/backend/CreateBCode.jrag:951")
public ConstructorDecl bytecodeTarget() {
ConstructorDecl bytecodeTarget_value = sourceConstructorDecl().bytecodeTarget();
return bytecodeTarget_value;
}
/**
* @declaredat /home/jesper/git/extendj/java5/frontend/GenericMethods.jrag:231
* @apilevel internal
*/
public SimpleSet Define_lookupType(ASTNode _callerNode, ASTNode _childNode, String name) {
int childIndex = this.getIndexOfChild(_callerNode);
{
TypeDecl paramType = getParameterization().substitute(name);
if (paramType != null) {
return paramType;
}
return lookupType(name);
}
}
/**
* @declaredat /home/jesper/git/extendj/java5/frontend/GenericMethods.jrag:231
* @apilevel internal
* @return {@code true} if this node has an equation for the inherited attribute lookupType
*/
protected boolean canDefine_lookupType(ASTNode _callerNode, ASTNode _childNode, String name) {
return true;
}
/** @apilevel internal */
public ASTNode rewriteTo() {
return super.rewriteTo();
}
/** @apilevel internal */
public boolean canRewrite() {
return false;
}
}