org.extendj.ast.ArrayDecl 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/java4/grammar/Java.ast:183
* @astdecl ArrayDecl : ClassDecl;
* @production ArrayDecl : {@link ClassDecl};
*/
public class ArrayDecl extends ClassDecl implements Cloneable {
/**
* @aspect Arrays
* @declaredat /home/jesper/git/extendj/java4/frontend/Arrays.jrag:99
*/
public Access createQualifiedAccess() {
return new ArrayTypeAccess(componentType().createQualifiedAccess());
}
/**
* @declaredat ASTNode:1
*/
public ArrayDecl() {
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[5];
setChild(new Opt(), 1);
setChild(new List(), 2);
setChild(new List(), 3);
setChild(new Opt(), 4);
}
/**
* @declaredat ASTNode:17
*/
@ASTNodeAnnotation.Constructor(
name = {"Modifiers", "ID", "SuperClass", "Implements", "BodyDecl"},
type = {"Modifiers", "String", "Opt", "List", "List"},
kind = {"Child", "Token", "Opt", "List", "List"}
)
public ArrayDecl(Modifiers p0, String p1, Opt p2, List p3, List p4) {
setChild(p0, 0);
setID(p1);
setChild(p2, 1);
setChild(p3, 2);
setChild(p4, 3);
}
/**
* @declaredat ASTNode:29
*/
public ArrayDecl(Modifiers p0, beaver.Symbol p1, Opt p2, List p3, List p4) {
setChild(p0, 0);
setID(p1);
setChild(p2, 1);
setChild(p3, 2);
setChild(p4, 3);
}
/** @apilevel low-level
* @declaredat ASTNode:37
*/
protected int numChildren() {
return 4;
}
/**
* @apilevel internal
* @declaredat ASTNode:43
*/
public boolean mayHaveRewrite() {
return false;
}
/** @apilevel internal
* @declaredat ASTNode:47
*/
public void flushAttrCache() {
super.flushAttrCache();
accessibleFrom_TypeDecl_reset();
dimension_reset();
elementType_reset();
fullName_reset();
typeName_reset();
castingConversionTo_TypeDecl_reset();
instanceOf_TypeDecl_reset();
subtype_TypeDecl_reset();
erasure_reset();
usesTypeVariable_reset();
involvesTypeParameters_reset();
verificationType_reset();
jvmName_reset();
constantPoolName_reset();
typeDescriptor_reset();
needsSignatureAttribute_reset();
fieldTypeSignature_reset();
classTypeSignature_reset();
}
/** @apilevel internal
* @declaredat ASTNode:69
*/
public void flushCollectionCache() {
super.flushCollectionCache();
}
/** @apilevel internal
* @declaredat ASTNode:73
*/
public ArrayDecl clone() throws CloneNotSupportedException {
ArrayDecl node = (ArrayDecl) super.clone();
return node;
}
/** @apilevel internal
* @declaredat ASTNode:78
*/
public ArrayDecl copy() {
try {
ArrayDecl node = (ArrayDecl) 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:97
*/
@Deprecated
public ArrayDecl 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:107
*/
public ArrayDecl treeCopyNoTransform() {
ArrayDecl tree = (ArrayDecl) copy();
if (children != null) {
for (int i = 0; i < children.length; ++i) {
switch (i) {
case 4:
tree.children[i] = new Opt();
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:132
*/
public ArrayDecl treeCopy() {
ArrayDecl tree = (ArrayDecl) copy();
if (children != null) {
for (int i = 0; i < children.length; ++i) {
switch (i) {
case 4:
tree.children[i] = new Opt();
continue;
}
ASTNode child = (ASTNode) getChild(i);
if (child != null) {
child = child.treeCopy();
tree.setChild(child, i);
}
}
}
return tree;
}
/** @apilevel internal
* @declaredat ASTNode:151
*/
protected boolean is$Equal(ASTNode node) {
return super.is$Equal(node) && (tokenString_ID == ((ArrayDecl) node).tokenString_ID);
}
/**
* 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 optional node for the SuperClass child. This is the Opt
* node containing the child SuperClass, not the actual child!
* @param opt The new node to be used as the optional node for the SuperClass child.
* @apilevel low-level
*/
public void setSuperClassOpt(Opt opt) {
setChild(opt, 1);
}
/**
* Replaces the (optional) SuperClass child.
* @param node The new node to be used as the SuperClass child.
* @apilevel high-level
*/
public void setSuperClass(Access node) {
getSuperClassOpt().setChild(node, 0);
}
/**
* Check whether the optional SuperClass child exists.
* @return {@code true} if the optional SuperClass child exists, {@code false} if it does not.
* @apilevel high-level
*/
public boolean hasSuperClass() {
return getSuperClassOpt().getNumChild() != 0;
}
/**
* Retrieves the (optional) SuperClass child.
* @return The SuperClass child, if it exists. Returns {@code null} otherwise.
* @apilevel low-level
*/
public Access getSuperClass() {
return (Access) getSuperClassOpt().getChild(0);
}
/**
* Retrieves the optional node for the SuperClass child. This is the Opt
node containing the child SuperClass, not the actual child!
* @return The optional node for child the SuperClass child.
* @apilevel low-level
*/
@ASTNodeAnnotation.OptChild(name="SuperClass")
public Opt getSuperClassOpt() {
return (Opt) getChild(1);
}
/**
* Retrieves the optional node for child SuperClass. This is the Opt
node containing the child SuperClass, not the actual child!
* This method does not invoke AST transformations.
* @return The optional node for child SuperClass.
* @apilevel low-level
*/
public Opt getSuperClassOptNoTransform() {
return (Opt) getChildNoTransform(1);
}
/**
* Replaces the Implements list.
* @param list The new list node to be used as the Implements list.
* @apilevel high-level
*/
public void setImplementsList(List list) {
setChild(list, 2);
}
/**
* Retrieves the number of children in the Implements list.
* @return Number of children in the Implements list.
* @apilevel high-level
*/
public int getNumImplements() {
return getImplementsList().getNumChild();
}
/**
* Retrieves the number of children in the Implements list.
* Calling this method will not trigger rewrites.
* @return Number of children in the Implements list.
* @apilevel low-level
*/
public int getNumImplementsNoTransform() {
return getImplementsListNoTransform().getNumChildNoTransform();
}
/**
* Retrieves the element at index {@code i} in the Implements list.
* @param i Index of the element to return.
* @return The element at position {@code i} in the Implements list.
* @apilevel high-level
*/
public Access getImplements(int i) {
return (Access) getImplementsList().getChild(i);
}
/**
* Check whether the Implements list has any children.
* @return {@code true} if it has at least one child, {@code false} otherwise.
* @apilevel high-level
*/
public boolean hasImplements() {
return getImplementsList().getNumChild() != 0;
}
/**
* Append an element to the Implements list.
* @param node The element to append to the Implements list.
* @apilevel high-level
*/
public void addImplements(Access node) {
List list = (parent == null) ? getImplementsListNoTransform() : getImplementsList();
list.addChild(node);
}
/** @apilevel low-level
*/
public void addImplementsNoTransform(Access node) {
List list = getImplementsListNoTransform();
list.addChild(node);
}
/**
* Replaces the Implements 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 setImplements(Access node, int i) {
List list = getImplementsList();
list.setChild(node, i);
}
/**
* Retrieves the Implements list.
* @return The node representing the Implements list.
* @apilevel high-level
*/
@ASTNodeAnnotation.ListChild(name="Implements")
public List getImplementsList() {
List list = (List) getChild(2);
return list;
}
/**
* Retrieves the Implements list.
* This method does not invoke AST transformations.
* @return The node representing the Implements list.
* @apilevel low-level
*/
public List getImplementsListNoTransform() {
return (List) getChildNoTransform(2);
}
/**
* @return the element at index {@code i} in the Implements list without
* triggering rewrites.
*/
public Access getImplementsNoTransform(int i) {
return (Access) getImplementsListNoTransform().getChildNoTransform(i);
}
/**
* Retrieves the Implements list.
* @return The node representing the Implements list.
* @apilevel high-level
*/
public List getImplementss() {
return getImplementsList();
}
/**
* Retrieves the Implements list.
* This method does not invoke AST transformations.
* @return The node representing the Implements list.
* @apilevel low-level
*/
public List getImplementssNoTransform() {
return getImplementsListNoTransform();
}
/**
* Replaces the BodyDecl list.
* @param list The new list node to be used as the BodyDecl list.
* @apilevel high-level
*/
public void setBodyDeclList(List list) {
setChild(list, 3);
}
/**
* Retrieves the number of children in the BodyDecl list.
* @return Number of children in the BodyDecl list.
* @apilevel high-level
*/
public int getNumBodyDecl() {
return getBodyDeclList().getNumChild();
}
/**
* Retrieves the number of children in the BodyDecl list.
* Calling this method will not trigger rewrites.
* @return Number of children in the BodyDecl list.
* @apilevel low-level
*/
public int getNumBodyDeclNoTransform() {
return getBodyDeclListNoTransform().getNumChildNoTransform();
}
/**
* Retrieves the element at index {@code i} in the BodyDecl list.
* @param i Index of the element to return.
* @return The element at position {@code i} in the BodyDecl list.
* @apilevel high-level
*/
public BodyDecl getBodyDecl(int i) {
return (BodyDecl) getBodyDeclList().getChild(i);
}
/**
* Check whether the BodyDecl list has any children.
* @return {@code true} if it has at least one child, {@code false} otherwise.
* @apilevel high-level
*/
public boolean hasBodyDecl() {
return getBodyDeclList().getNumChild() != 0;
}
/**
* Append an element to the BodyDecl list.
* @param node The element to append to the BodyDecl list.
* @apilevel high-level
*/
public void addBodyDecl(BodyDecl node) {
List list = (parent == null) ? getBodyDeclListNoTransform() : getBodyDeclList();
list.addChild(node);
}
/** @apilevel low-level
*/
public void addBodyDeclNoTransform(BodyDecl node) {
List list = getBodyDeclListNoTransform();
list.addChild(node);
}
/**
* Replaces the BodyDecl 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 setBodyDecl(BodyDecl node, int i) {
List list = getBodyDeclList();
list.setChild(node, i);
}
/**
* Retrieves the BodyDecl list.
* @return The node representing the BodyDecl list.
* @apilevel high-level
*/
@ASTNodeAnnotation.ListChild(name="BodyDecl")
public List getBodyDeclList() {
List list = (List) getChild(3);
return list;
}
/**
* Retrieves the BodyDecl list.
* This method does not invoke AST transformations.
* @return The node representing the BodyDecl list.
* @apilevel low-level
*/
public List getBodyDeclListNoTransform() {
return (List) getChildNoTransform(3);
}
/**
* @return the element at index {@code i} in the BodyDecl list without
* triggering rewrites.
*/
public BodyDecl getBodyDeclNoTransform(int i) {
return (BodyDecl) getBodyDeclListNoTransform().getChildNoTransform(i);
}
/**
* Retrieves the BodyDecl list.
* @return The node representing the BodyDecl list.
* @apilevel high-level
*/
public List getBodyDecls() {
return getBodyDeclList();
}
/**
* Retrieves the BodyDecl list.
* This method does not invoke AST transformations.
* @return The node representing the BodyDecl list.
* @apilevel low-level
*/
public List getBodyDeclsNoTransform() {
return getBodyDeclListNoTransform();
}
/**
* Replaces the (optional) ImplicitConstructor child.
* @param node The new node to be used as the ImplicitConstructor child.
* @apilevel high-level
*/
public void setImplicitConstructor(ConstructorDecl node) {
getImplicitConstructorOpt().setChild(node, 0);
}
/**
* Check whether the optional ImplicitConstructor child exists.
* @return {@code true} if the optional ImplicitConstructor child exists, {@code false} if it does not.
* @apilevel high-level
*/
public boolean hasImplicitConstructor() {
return getImplicitConstructorOpt().getNumChild() != 0;
}
/**
* Retrieves the (optional) ImplicitConstructor child.
* @return The ImplicitConstructor child, if it exists. Returns {@code null} otherwise.
* @apilevel low-level
*/
public ConstructorDecl getImplicitConstructor() {
return (ConstructorDecl) getImplicitConstructorOpt().getChild(0);
}
/**
* Retrieves the optional node for child ImplicitConstructor. This is the Opt
node containing the child ImplicitConstructor, not the actual child!
* This method does not invoke AST transformations.
* @return The optional node for child ImplicitConstructor.
* @apilevel low-level
*/
public Opt getImplicitConstructorOptNoTransform() {
return (Opt) getChildNoTransform(4);
}
/**
* Retrieves the child position of the optional child ImplicitConstructor.
* @return The the child position of the optional child ImplicitConstructor.
* @apilevel low-level
*/
protected int getImplicitConstructorOptChildPosition() {
return 4;
}
/**
* @aspect TypeConversion
* @declaredat /home/jesper/git/extendj/java4/frontend/TypeAnalysis.jrag:132
*/
private boolean refined_TypeConversion_ArrayDecl_castingConversionTo_TypeDecl(TypeDecl type)
{
if (type.isArrayDecl()) {
TypeDecl SC = componentType();
TypeDecl TC = type.componentType();
if (SC.isPrimitiveType() && TC.isPrimitiveType() && SC == TC) {
return true;
}
if (SC.isReferenceType() && TC.isReferenceType()) {
return SC.castingConversionTo(TC);
}
return false;
} else if (type.isClassDecl()) {
return type.isObject();
} else if (type.isInterfaceDecl()) {
return type == typeSerializable() || type == typeCloneable();
} else return super.castingConversionTo(type);
}
/** @apilevel internal */
private void accessibleFrom_TypeDecl_reset() {
accessibleFrom_TypeDecl_computed = null;
accessibleFrom_TypeDecl_values = null;
}
/** @apilevel internal */
protected java.util.Map accessibleFrom_TypeDecl_values;
/** @apilevel internal */
protected java.util.Map accessibleFrom_TypeDecl_computed;
/**
* @attribute syn
* @aspect AccessControl
* @declaredat /home/jesper/git/extendj/java4/frontend/AccessControl.jrag:37
*/
@ASTNodeAnnotation.Attribute(kind=ASTNodeAnnotation.Kind.SYN)
@ASTNodeAnnotation.Source(aspect="AccessControl", declaredAt="/home/jesper/git/extendj/java4/frontend/AccessControl.jrag:37")
public boolean accessibleFrom(TypeDecl type) {
Object _parameters = type;
if (accessibleFrom_TypeDecl_computed == null) accessibleFrom_TypeDecl_computed = new java.util.HashMap(4);
if (accessibleFrom_TypeDecl_values == null) accessibleFrom_TypeDecl_values = new java.util.HashMap(4);
ASTState state = state();
if (accessibleFrom_TypeDecl_values.containsKey(_parameters)
&& accessibleFrom_TypeDecl_computed.containsKey(_parameters)
&& (accessibleFrom_TypeDecl_computed.get(_parameters) == ASTState.NON_CYCLE || accessibleFrom_TypeDecl_computed.get(_parameters) == state().cycle())) {
return (Boolean) accessibleFrom_TypeDecl_values.get(_parameters);
}
boolean accessibleFrom_TypeDecl_value = elementType().accessibleFrom(type);
if (state().inCircle()) {
accessibleFrom_TypeDecl_values.put(_parameters, accessibleFrom_TypeDecl_value);
accessibleFrom_TypeDecl_computed.put(_parameters, state().cycle());
} else {
accessibleFrom_TypeDecl_values.put(_parameters, accessibleFrom_TypeDecl_value);
accessibleFrom_TypeDecl_computed.put(_parameters, ASTState.NON_CYCLE);
}
return accessibleFrom_TypeDecl_value;
}
/** @apilevel internal */
private void dimension_reset() {
dimension_computed = null;
}
/** @apilevel internal */
protected ASTState.Cycle dimension_computed = null;
/** @apilevel internal */
protected int dimension_value;
/**
* Dimension of this type, if it is an array type.
* @return 0 for non-array types, and the array dimension for an array type.
* @attribute syn
* @aspect Arrays
* @declaredat /home/jesper/git/extendj/java4/frontend/Arrays.jrag:36
*/
@ASTNodeAnnotation.Attribute(kind=ASTNodeAnnotation.Kind.SYN)
@ASTNodeAnnotation.Source(aspect="Arrays", declaredAt="/home/jesper/git/extendj/java4/frontend/Arrays.jrag:36")
public int dimension() {
ASTState state = state();
if (dimension_computed == ASTState.NON_CYCLE || dimension_computed == state().cycle()) {
return dimension_value;
}
dimension_value = componentType().dimension() + 1;
if (state().inCircle()) {
dimension_computed = state().cycle();
} else {
dimension_computed = ASTState.NON_CYCLE;
}
return dimension_value;
}
/** @apilevel internal */
private void elementType_reset() {
elementType_computed = null;
elementType_value = null;
}
/** @apilevel internal */
protected ASTState.Cycle elementType_computed = null;
/** @apilevel internal */
protected TypeDecl elementType_value;
/**
* @return the base type that the array is based on. For example, returns int
* for an int[][] array type.
* @attribute syn
* @aspect Arrays
* @declaredat /home/jesper/git/extendj/java4/frontend/Arrays.jrag:44
*/
@ASTNodeAnnotation.Attribute(kind=ASTNodeAnnotation.Kind.SYN)
@ASTNodeAnnotation.Source(aspect="Arrays", declaredAt="/home/jesper/git/extendj/java4/frontend/Arrays.jrag:44")
public TypeDecl elementType() {
ASTState state = state();
if (elementType_computed == ASTState.NON_CYCLE || elementType_computed == state().cycle()) {
return elementType_value;
}
elementType_value = componentType().elementType();
if (state().inCircle()) {
elementType_computed = state().cycle();
} else {
elementType_computed = ASTState.NON_CYCLE;
}
return elementType_value;
}
/**
* @attribute syn
* @aspect TypeName
* @declaredat /home/jesper/git/extendj/java4/frontend/QualifiedNames.jrag:82
*/
@ASTNodeAnnotation.Attribute(kind=ASTNodeAnnotation.Kind.SYN)
@ASTNodeAnnotation.Source(aspect="TypeName", declaredAt="/home/jesper/git/extendj/java4/frontend/QualifiedNames.jrag:82")
public String name() {
String name_value = fullName();
return name_value;
}
/** @apilevel internal */
private void fullName_reset() {
fullName_computed = null;
fullName_value = null;
}
/** @apilevel internal */
protected ASTState.Cycle fullName_computed = null;
/** @apilevel internal */
protected String fullName_value;
/**
* @attribute syn
* @aspect TypeName
* @declaredat /home/jesper/git/extendj/java4/frontend/QualifiedNames.jrag:84
*/
@ASTNodeAnnotation.Attribute(kind=ASTNodeAnnotation.Kind.SYN)
@ASTNodeAnnotation.Source(aspect="TypeName", declaredAt="/home/jesper/git/extendj/java4/frontend/QualifiedNames.jrag:84")
public String fullName() {
ASTState state = state();
if (fullName_computed == ASTState.NON_CYCLE || fullName_computed == state().cycle()) {
return fullName_value;
}
fullName_value = getID();
if (state().inCircle()) {
fullName_computed = state().cycle();
} else {
fullName_computed = ASTState.NON_CYCLE;
}
return fullName_value;
}
/** @apilevel internal */
private void typeName_reset() {
typeName_computed = null;
typeName_value = null;
}
/** @apilevel internal */
protected ASTState.Cycle typeName_computed = null;
/** @apilevel internal */
protected String typeName_value;
/**
* The qualified typename of this type.
*
* Includes array suffix and type arguments.
* @attribute syn
* @aspect TypeName
* @declaredat /home/jesper/git/extendj/java4/frontend/QualifiedNames.jrag:100
*/
@ASTNodeAnnotation.Attribute(kind=ASTNodeAnnotation.Kind.SYN)
@ASTNodeAnnotation.Source(aspect="TypeName", declaredAt="/home/jesper/git/extendj/java4/frontend/QualifiedNames.jrag:100")
public String typeName() {
ASTState state = state();
if (typeName_computed == ASTState.NON_CYCLE || typeName_computed == state().cycle()) {
return typeName_value;
}
typeName_value = componentType().typeName() + "[]";
if (state().inCircle()) {
typeName_computed = state().cycle();
} else {
typeName_computed = ASTState.NON_CYCLE;
}
return typeName_value;
}
/** @apilevel internal */
private void castingConversionTo_TypeDecl_reset() {
castingConversionTo_TypeDecl_computed = null;
castingConversionTo_TypeDecl_values = null;
}
/** @apilevel internal */
protected java.util.Map castingConversionTo_TypeDecl_values;
/** @apilevel internal */
protected java.util.Map castingConversionTo_TypeDecl_computed;
/**
* @attribute syn
* @aspect TypeConversion
* @declaredat /home/jesper/git/extendj/java4/frontend/TypeAnalysis.jrag:100
*/
@ASTNodeAnnotation.Attribute(kind=ASTNodeAnnotation.Kind.SYN)
@ASTNodeAnnotation.Source(aspect="TypeConversion", declaredAt="/home/jesper/git/extendj/java4/frontend/TypeAnalysis.jrag:100")
public boolean castingConversionTo(TypeDecl type) {
Object _parameters = type;
if (castingConversionTo_TypeDecl_computed == null) castingConversionTo_TypeDecl_computed = new java.util.HashMap(4);
if (castingConversionTo_TypeDecl_values == null) castingConversionTo_TypeDecl_values = new java.util.HashMap(4);
ASTState state = state();
if (castingConversionTo_TypeDecl_values.containsKey(_parameters)
&& castingConversionTo_TypeDecl_computed.containsKey(_parameters)
&& (castingConversionTo_TypeDecl_computed.get(_parameters) == ASTState.NON_CYCLE || castingConversionTo_TypeDecl_computed.get(_parameters) == state().cycle())) {
return (Boolean) castingConversionTo_TypeDecl_values.get(_parameters);
}
boolean castingConversionTo_TypeDecl_value = castingConversionTo_compute(type);
if (state().inCircle()) {
castingConversionTo_TypeDecl_values.put(_parameters, castingConversionTo_TypeDecl_value);
castingConversionTo_TypeDecl_computed.put(_parameters, state().cycle());
} else {
castingConversionTo_TypeDecl_values.put(_parameters, castingConversionTo_TypeDecl_value);
castingConversionTo_TypeDecl_computed.put(_parameters, ASTState.NON_CYCLE);
}
return castingConversionTo_TypeDecl_value;
}
/** @apilevel internal */
private boolean castingConversionTo_compute(TypeDecl type) {
TypeDecl S = this;
TypeDecl T = type;
if (T instanceof TypeVariable) {
TypeVariable t = (TypeVariable) T;
if (!type.isReferenceType()) {
return false;
}
if (t.getNumTypeBound() == 0) {
return true;
}
for (int i = 0; i < t.getNumTypeBound(); i++) {
TypeDecl bound = t.getTypeBound(i).type();
if (bound.isObject() || bound == typeSerializable() || bound == typeCloneable()) {
return true;
}
if (bound.isTypeVariable() && castingConversionTo(bound)) {
return true;
}
if (bound.isArrayDecl() && castingConversionTo(bound)) {
return true;
}
}
return false;
} else {
return refined_TypeConversion_ArrayDecl_castingConversionTo_TypeDecl(type);
}
}
/**
* @attribute syn
* @aspect TypeAnalysis
* @declaredat /home/jesper/git/extendj/java4/frontend/TypeAnalysis.jrag:222
*/
@ASTNodeAnnotation.Attribute(kind=ASTNodeAnnotation.Kind.SYN)
@ASTNodeAnnotation.Source(aspect="TypeAnalysis", declaredAt="/home/jesper/git/extendj/java4/frontend/TypeAnalysis.jrag:222")
public boolean isClassDecl() {
boolean isClassDecl_value = false;
return isClassDecl_value;
}
/**
* @attribute syn
* @aspect TypeAnalysis
* @declaredat /home/jesper/git/extendj/java4/frontend/TypeAnalysis.jrag:228
*/
@ASTNodeAnnotation.Attribute(kind=ASTNodeAnnotation.Kind.SYN)
@ASTNodeAnnotation.Source(aspect="TypeAnalysis", declaredAt="/home/jesper/git/extendj/java4/frontend/TypeAnalysis.jrag:228")
public boolean isArrayDecl() {
boolean isArrayDecl_value = true;
return isArrayDecl_value;
}
/** @apilevel internal */
private void instanceOf_TypeDecl_reset() {
instanceOf_TypeDecl_computed = null;
instanceOf_TypeDecl_values = null;
}
/** @apilevel internal */
protected java.util.Map instanceOf_TypeDecl_values;
/** @apilevel internal */
protected java.util.Map instanceOf_TypeDecl_computed;
/**
* @attribute syn
* @aspect TypeWideningAndIdentity
* @declaredat /home/jesper/git/extendj/java4/frontend/TypeAnalysis.jrag:442
*/
@ASTNodeAnnotation.Attribute(kind=ASTNodeAnnotation.Kind.SYN)
@ASTNodeAnnotation.Source(aspect="TypeWideningAndIdentity", declaredAt="/home/jesper/git/extendj/java4/frontend/TypeAnalysis.jrag:442")
public boolean instanceOf(TypeDecl type) {
Object _parameters = type;
if (instanceOf_TypeDecl_computed == null) instanceOf_TypeDecl_computed = new java.util.HashMap(4);
if (instanceOf_TypeDecl_values == null) instanceOf_TypeDecl_values = new java.util.HashMap(4);
ASTState state = state();
if (instanceOf_TypeDecl_values.containsKey(_parameters)
&& instanceOf_TypeDecl_computed.containsKey(_parameters)
&& (instanceOf_TypeDecl_computed.get(_parameters) == ASTState.NON_CYCLE || instanceOf_TypeDecl_computed.get(_parameters) == state().cycle())) {
return (Boolean) instanceOf_TypeDecl_values.get(_parameters);
}
boolean instanceOf_TypeDecl_value = instanceOf_compute(type);
if (state().inCircle()) {
instanceOf_TypeDecl_values.put(_parameters, instanceOf_TypeDecl_value);
instanceOf_TypeDecl_computed.put(_parameters, state().cycle());
} else {
instanceOf_TypeDecl_values.put(_parameters, instanceOf_TypeDecl_value);
instanceOf_TypeDecl_computed.put(_parameters, ASTState.NON_CYCLE);
}
return instanceOf_TypeDecl_value;
}
/** @apilevel internal */
private boolean instanceOf_compute(TypeDecl type) {
return subtype(type);
}
/**
* @attribute syn
* @aspect TypeWideningAndIdentity
* @declaredat /home/jesper/git/extendj/java4/frontend/TypeAnalysis.jrag:491
*/
@ASTNodeAnnotation.Attribute(kind=ASTNodeAnnotation.Kind.SYN)
@ASTNodeAnnotation.Source(aspect="TypeWideningAndIdentity", declaredAt="/home/jesper/git/extendj/java4/frontend/TypeAnalysis.jrag:491")
public boolean isSupertypeOfArrayDecl(ArrayDecl type) {
{
if (type.elementType().isPrimitive() && elementType().isPrimitive()) {
return type.dimension() == dimension() && type.elementType() == elementType();
}
return type.componentType().instanceOf(componentType());
}
}
/**
* A type is reifiable if it either refers to a non-parameterized type,
* is a raw type, is a parameterized type with only unbound wildcard
* parameters or is an array type with a reifiable type parameter.
*
* @see "JLS SE7 §4.7"
* @attribute syn
* @aspect ReifiableTypes
* @declaredat /home/jesper/git/extendj/java5/frontend/ReifiableTypes.jrag:39
*/
@ASTNodeAnnotation.Attribute(kind=ASTNodeAnnotation.Kind.SYN)
@ASTNodeAnnotation.Source(aspect="ReifiableTypes", declaredAt="/home/jesper/git/extendj/java5/frontend/ReifiableTypes.jrag:39")
public boolean isReifiable() {
boolean isReifiable_value = componentType().isReifiable();
return isReifiable_value;
}
/**
* @attribute syn
* @aspect Annotations
* @declaredat /home/jesper/git/extendj/java5/frontend/Annotations.jrag:199
*/
@ASTNodeAnnotation.Attribute(kind=ASTNodeAnnotation.Kind.SYN)
@ASTNodeAnnotation.Source(aspect="Annotations", declaredAt="/home/jesper/git/extendj/java5/frontend/Annotations.jrag:199")
public boolean isValidAnnotationMethodReturnType() {
boolean isValidAnnotationMethodReturnType_value = !componentType().isArrayDecl() && componentType().isValidAnnotationMethodReturnType();
return isValidAnnotationMethodReturnType_value;
}
/**
* An element type T is commensurate with an element value V if and only if one of the following conditions is true:
*
* - T is an array type E[] and either:
*
* - V is an ElementValueArrayInitializer and each ElementValueInitializer
* (analogous to a variable initializer in an array initializer) in V is
* commensurate with E, or,
*
- V is an ElementValue that is commensurate with T.
*
* - The type of V is assignment compatible (\ufffd5.2) with T and, furthermore:
*
* - If T is a primitive type or String, V is a constant expression (\ufffd15.28).
*
- V is not null.
*
- if T is Class, or an invocation of Class, and V is a class literal (\ufffd15.8.2).
*
- If T is an enum type, and V is an enum constant.
*
*
* @attribute syn
* @aspect Annotations
* @declaredat /home/jesper/git/extendj/java5/frontend/Annotations.jrag:673
*/
@ASTNodeAnnotation.Attribute(kind=ASTNodeAnnotation.Kind.SYN)
@ASTNodeAnnotation.Source(aspect="Annotations", declaredAt="/home/jesper/git/extendj/java5/frontend/Annotations.jrag:673")
public boolean commensurateWith(ElementValue value) {
boolean commensurateWith_ElementValue_value = value.commensurateWithArrayDecl(this);
return commensurateWith_ElementValue_value;
}
/** @apilevel internal */
private void subtype_TypeDecl_reset() {
subtype_TypeDecl_values = null;
}
protected java.util.Map subtype_TypeDecl_values;
@ASTNodeAnnotation.Attribute(kind=ASTNodeAnnotation.Kind.SYN, isCircular=true)
@ASTNodeAnnotation.Source(aspect="GenericsSubtype", declaredAt="/home/jesper/git/extendj/java5/frontend/GenericsSubtype.jrag:500")
public boolean subtype(TypeDecl type) {
Object _parameters = type;
if (subtype_TypeDecl_values == null) subtype_TypeDecl_values = new java.util.HashMap(4);
ASTState.CircularValue _value;
if (subtype_TypeDecl_values.containsKey(_parameters)) {
Object _cache = subtype_TypeDecl_values.get(_parameters);
if (!(_cache instanceof ASTState.CircularValue)) {
return (Boolean) _cache;
} else {
_value = (ASTState.CircularValue) _cache;
}
} else {
_value = new ASTState.CircularValue();
subtype_TypeDecl_values.put(_parameters, _value);
_value.value = true;
}
ASTState state = state();
if (!state.inCircle() || state.calledByLazyAttribute()) {
state.enterCircle();
boolean new_subtype_TypeDecl_value;
do {
_value.cycle = state.nextCycle();
new_subtype_TypeDecl_value = type.supertypeArrayDecl(this);
if (((Boolean)_value.value) != new_subtype_TypeDecl_value) {
state.setChangeInCycle();
_value.value = new_subtype_TypeDecl_value;
}
} while (state.testAndClearChangeInCycle());
subtype_TypeDecl_values.put(_parameters, new_subtype_TypeDecl_value);
state.leaveCircle();
return new_subtype_TypeDecl_value;
} else if (_value.cycle != state.cycle()) {
_value.cycle = state.cycle();
boolean new_subtype_TypeDecl_value = type.supertypeArrayDecl(this);
if (((Boolean)_value.value) != new_subtype_TypeDecl_value) {
state.setChangeInCycle();
_value.value = new_subtype_TypeDecl_value;
}
return new_subtype_TypeDecl_value;
} else {
return (Boolean) _value.value;
}
}
/**
* @attribute syn
* @aspect GenericsSubtype
* @declaredat /home/jesper/git/extendj/java5/frontend/GenericsSubtype.jrag:547
*/
@ASTNodeAnnotation.Attribute(kind=ASTNodeAnnotation.Kind.SYN)
@ASTNodeAnnotation.Source(aspect="GenericsSubtype", declaredAt="/home/jesper/git/extendj/java5/frontend/GenericsSubtype.jrag:547")
public boolean supertypeArrayDecl(ArrayDecl type) {
{
if (type.elementType().isPrimitive() && elementType().isPrimitive()) {
return type.dimension() == dimension() && type.elementType() == elementType();
}
return type.componentType().subtype(componentType());
}
}
/** @apilevel internal */
private void erasure_reset() {
erasure_computed = null;
erasure_value = null;
}
/** @apilevel internal */
protected ASTState.Cycle erasure_computed = null;
/** @apilevel internal */
protected TypeDecl erasure_value;
/**
* @attribute syn
* @aspect GenericsErasure
* @declaredat /home/jesper/git/extendj/java5/frontend/Generics.jrag:460
*/
@ASTNodeAnnotation.Attribute(kind=ASTNodeAnnotation.Kind.SYN)
@ASTNodeAnnotation.Source(aspect="GenericsErasure", declaredAt="/home/jesper/git/extendj/java5/frontend/Generics.jrag:460")
public TypeDecl erasure() {
ASTState state = state();
if (erasure_computed == ASTState.NON_CYCLE || erasure_computed == state().cycle()) {
return erasure_value;
}
erasure_value = componentType().erasure().arrayType();
if (state().inCircle()) {
erasure_computed = state().cycle();
} else {
erasure_computed = ASTState.NON_CYCLE;
}
return erasure_value;
}
/** @apilevel internal */
protected ASTState.Cycle usesTypeVariable_cycle = null;
/** @apilevel internal */
private void usesTypeVariable_reset() {
usesTypeVariable_computed = false;
usesTypeVariable_initialized = false;
usesTypeVariable_cycle = null;
}
/** @apilevel internal */
protected boolean usesTypeVariable_computed = false;
/** @apilevel internal */
protected boolean usesTypeVariable_value;
/** @apilevel internal */
protected boolean usesTypeVariable_initialized = false;
@ASTNodeAnnotation.Attribute(kind=ASTNodeAnnotation.Kind.SYN, isCircular=true)
@ASTNodeAnnotation.Source(aspect="LookupParTypeDecl", declaredAt="/home/jesper/git/extendj/java5/frontend/Generics.jrag:1337")
public boolean usesTypeVariable() {
if (usesTypeVariable_computed) {
return usesTypeVariable_value;
}
ASTState state = state();
if (!usesTypeVariable_initialized) {
usesTypeVariable_initialized = true;
usesTypeVariable_value = false;
}
if (!state.inCircle() || state.calledByLazyAttribute()) {
state.enterCircle();
do {
usesTypeVariable_cycle = state.nextCycle();
boolean new_usesTypeVariable_value = elementType().usesTypeVariable();
if (usesTypeVariable_value != new_usesTypeVariable_value) {
state.setChangeInCycle();
}
usesTypeVariable_value = new_usesTypeVariable_value;
} while (state.testAndClearChangeInCycle());
usesTypeVariable_computed = true;
state.leaveCircle();
} else if (usesTypeVariable_cycle != state.cycle()) {
usesTypeVariable_cycle = state.cycle();
boolean new_usesTypeVariable_value = elementType().usesTypeVariable();
if (usesTypeVariable_value != new_usesTypeVariable_value) {
state.setChangeInCycle();
}
usesTypeVariable_value = new_usesTypeVariable_value;
} else {
}
return usesTypeVariable_value;
}
/**
* @param bound the bounded type variable
* @return {@code true} if this type is within the bounds of the parameter type
* @attribute syn
* @aspect GenericBoundCheck
* @declaredat /home/jesper/git/extendj/java5/frontend/GenericBoundCheck.jrag:40
*/
@ASTNodeAnnotation.Attribute(kind=ASTNodeAnnotation.Kind.SYN)
@ASTNodeAnnotation.Source(aspect="GenericBoundCheck", declaredAt="/home/jesper/git/extendj/java5/frontend/GenericBoundCheck.jrag:40")
public boolean withinBounds(TypeDecl bound) {
boolean withinBounds_TypeDecl_value = bound.boundOfArray(this);
return withinBounds_TypeDecl_value;
}
/**
* @attribute syn
* @aspect GenericBoundCheck
* @declaredat /home/jesper/git/extendj/java5/frontend/GenericBoundCheck.jrag:86
*/
@ASTNodeAnnotation.Attribute(kind=ASTNodeAnnotation.Kind.SYN)
@ASTNodeAnnotation.Source(aspect="GenericBoundCheck", declaredAt="/home/jesper/git/extendj/java5/frontend/GenericBoundCheck.jrag:86")
public boolean boundOfArray(ArrayDecl type) {
boolean boundOfArray_ArrayDecl_value = type.componentType().withinBounds(componentType());
return boundOfArray_ArrayDecl_value;
}
/** @apilevel internal */
protected ASTState.Cycle involvesTypeParameters_cycle = null;
/** @apilevel internal */
private void involvesTypeParameters_reset() {
involvesTypeParameters_computed = false;
involvesTypeParameters_initialized = false;
involvesTypeParameters_cycle = null;
}
/** @apilevel internal */
protected boolean involvesTypeParameters_computed = false;
/** @apilevel internal */
protected boolean involvesTypeParameters_value;
/** @apilevel internal */
protected boolean involvesTypeParameters_initialized = false;
@ASTNodeAnnotation.Attribute(kind=ASTNodeAnnotation.Kind.SYN, isCircular=true)
@ASTNodeAnnotation.Source(aspect="GenericMethodsInference", declaredAt="/home/jesper/git/extendj/java5/frontend/GenericMethodsInference.jrag:37")
public boolean involvesTypeParameters() {
if (involvesTypeParameters_computed) {
return involvesTypeParameters_value;
}
ASTState state = state();
if (!involvesTypeParameters_initialized) {
involvesTypeParameters_initialized = true;
involvesTypeParameters_value = false;
}
if (!state.inCircle() || state.calledByLazyAttribute()) {
state.enterCircle();
do {
involvesTypeParameters_cycle = state.nextCycle();
boolean new_involvesTypeParameters_value = componentType().involvesTypeParameters();
if (involvesTypeParameters_value != new_involvesTypeParameters_value) {
state.setChangeInCycle();
}
involvesTypeParameters_value = new_involvesTypeParameters_value;
} while (state.testAndClearChangeInCycle());
involvesTypeParameters_computed = true;
state.leaveCircle();
} else if (involvesTypeParameters_cycle != state.cycle()) {
involvesTypeParameters_cycle = state.cycle();
boolean new_involvesTypeParameters_value = componentType().involvesTypeParameters();
if (involvesTypeParameters_value != new_involvesTypeParameters_value) {
state.setChangeInCycle();
}
involvesTypeParameters_value = new_involvesTypeParameters_value;
} else {
}
return involvesTypeParameters_value;
}
/**
* @attribute syn
* @aspect CreateBCode
* @declaredat /home/jesper/git/extendj/java4/backend/CreateBCode.jrag:998
*/
@ASTNodeAnnotation.Attribute(kind=ASTNodeAnnotation.Kind.SYN)
@ASTNodeAnnotation.Source(aspect="CreateBCode", declaredAt="/home/jesper/git/extendj/java4/backend/CreateBCode.jrag:998")
public String arrayTypeDescriptor() {
String arrayTypeDescriptor_value = typeDescriptor();
return arrayTypeDescriptor_value;
}
/** @apilevel internal */
private void verificationType_reset() {
verificationType_computed = null;
verificationType_value = null;
}
/** @apilevel internal */
protected ASTState.Cycle verificationType_computed = null;
/** @apilevel internal */
protected VerificationType verificationType_value;
/**
* @attribute syn
* @aspect VerificationTypes
* @declaredat /home/jesper/git/extendj/java4/backend/VerificationTypes.jrag:42
*/
@ASTNodeAnnotation.Attribute(kind=ASTNodeAnnotation.Kind.SYN)
@ASTNodeAnnotation.Source(aspect="VerificationTypes", declaredAt="/home/jesper/git/extendj/java4/backend/VerificationTypes.jrag:42")
public VerificationType verificationType() {
ASTState state = state();
if (verificationType_computed == ASTState.NON_CYCLE || verificationType_computed == state().cycle()) {
return verificationType_value;
}
verificationType_value = new VerificationTypes.ArrayType(this);
if (state().inCircle()) {
verificationType_computed = state().cycle();
} else {
verificationType_computed = ASTState.NON_CYCLE;
}
return verificationType_value;
}
/** @apilevel internal */
private void jvmName_reset() {
jvmName_computed = null;
jvmName_value = null;
}
/** @apilevel internal */
protected ASTState.Cycle jvmName_computed = null;
/** @apilevel internal */
protected String jvmName_value;
/**
* @attribute syn
* @aspect Java2Rewrites
* @declaredat /home/jesper/git/extendj/java4/backend/Java2Rewrites.jrag:37
*/
@ASTNodeAnnotation.Attribute(kind=ASTNodeAnnotation.Kind.SYN)
@ASTNodeAnnotation.Source(aspect="Java2Rewrites", declaredAt="/home/jesper/git/extendj/java4/backend/Java2Rewrites.jrag:37")
public String jvmName() {
ASTState state = state();
if (jvmName_computed == ASTState.NON_CYCLE || jvmName_computed == state().cycle()) {
return jvmName_value;
}
jvmName_value = jvmName_compute();
if (state().inCircle()) {
jvmName_computed = state().cycle();
} else {
jvmName_computed = ASTState.NON_CYCLE;
}
return jvmName_value;
}
/** @apilevel internal */
private String jvmName_compute() {
StringBuilder dim = new StringBuilder();
for (int i = 0; i < dimension(); i++) {
dim.append("[");
}
if (elementType().isReferenceType()) {
dim.append("L")
.append(elementType().jvmName())
.append(";");
} else {
dim.append(elementType().jvmName());
}
return dim.toString();
}
/** @apilevel internal */
private void constantPoolName_reset() {
constantPoolName_computed = null;
constantPoolName_value = null;
}
/** @apilevel internal */
protected ASTState.Cycle constantPoolName_computed = null;
/** @apilevel internal */
protected String constantPoolName_value;
/**
* @attribute syn
* @aspect ConstantPoolNames
* @declaredat /home/jesper/git/extendj/java4/backend/ConstantPoolNames.jrag:76
*/
@ASTNodeAnnotation.Attribute(kind=ASTNodeAnnotation.Kind.SYN)
@ASTNodeAnnotation.Source(aspect="ConstantPoolNames", declaredAt="/home/jesper/git/extendj/java4/backend/ConstantPoolNames.jrag:76")
public String constantPoolName() {
ASTState state = state();
if (constantPoolName_computed == ASTState.NON_CYCLE || constantPoolName_computed == state().cycle()) {
return constantPoolName_value;
}
constantPoolName_value = typeDescriptor();
if (state().inCircle()) {
constantPoolName_computed = state().cycle();
} else {
constantPoolName_computed = ASTState.NON_CYCLE;
}
return constantPoolName_value;
}
/** @apilevel internal */
private void typeDescriptor_reset() {
typeDescriptor_computed = null;
typeDescriptor_value = null;
}
/** @apilevel internal */
protected ASTState.Cycle typeDescriptor_computed = null;
/** @apilevel internal */
protected String typeDescriptor_value;
/**
* @attribute syn
* @aspect ConstantPoolNames
* @declaredat /home/jesper/git/extendj/java4/backend/ConstantPoolNames.jrag:78
*/
@ASTNodeAnnotation.Attribute(kind=ASTNodeAnnotation.Kind.SYN)
@ASTNodeAnnotation.Source(aspect="ConstantPoolNames", declaredAt="/home/jesper/git/extendj/java4/backend/ConstantPoolNames.jrag:78")
public String typeDescriptor() {
ASTState state = state();
if (typeDescriptor_computed == ASTState.NON_CYCLE || typeDescriptor_computed == state().cycle()) {
return typeDescriptor_value;
}
typeDescriptor_value = typeDescriptor_compute();
if (state().inCircle()) {
typeDescriptor_computed = state().cycle();
} else {
typeDescriptor_computed = ASTState.NON_CYCLE;
}
return typeDescriptor_value;
}
/** @apilevel internal */
private String typeDescriptor_compute() {
StringBuilder dim = new StringBuilder();
for (int i = 0; i < dimension(); i++) {
dim.append("[");
}
dim.append(elementType().typeDescriptor());
return dim.toString();
}
/** @apilevel internal */
private void needsSignatureAttribute_reset() {
needsSignatureAttribute_computed = null;
}
/** @apilevel internal */
protected ASTState.Cycle needsSignatureAttribute_computed = null;
/** @apilevel internal */
protected boolean needsSignatureAttribute_value;
/**
* @attribute syn
* @aspect GenericsCodegen
* @declaredat /home/jesper/git/extendj/java5/backend/GenericsCodegen.jrag:406
*/
@ASTNodeAnnotation.Attribute(kind=ASTNodeAnnotation.Kind.SYN)
@ASTNodeAnnotation.Source(aspect="GenericsCodegen", declaredAt="/home/jesper/git/extendj/java5/backend/GenericsCodegen.jrag:406")
public boolean needsSignatureAttribute() {
ASTState state = state();
if (needsSignatureAttribute_computed == ASTState.NON_CYCLE || needsSignatureAttribute_computed == state().cycle()) {
return needsSignatureAttribute_value;
}
needsSignatureAttribute_value = elementType().needsSignatureAttribute();
if (state().inCircle()) {
needsSignatureAttribute_computed = state().cycle();
} else {
needsSignatureAttribute_computed = ASTState.NON_CYCLE;
}
return needsSignatureAttribute_value;
}
/** @apilevel internal */
private void fieldTypeSignature_reset() {
fieldTypeSignature_computed = null;
fieldTypeSignature_value = null;
}
/** @apilevel internal */
protected ASTState.Cycle fieldTypeSignature_computed = null;
/** @apilevel internal */
protected String fieldTypeSignature_value;
/**
* @attribute syn
* @aspect GenericsCodegen
* @declaredat /home/jesper/git/extendj/java5/backend/GenericsCodegen.jrag:524
*/
@ASTNodeAnnotation.Attribute(kind=ASTNodeAnnotation.Kind.SYN)
@ASTNodeAnnotation.Source(aspect="GenericsCodegen", declaredAt="/home/jesper/git/extendj/java5/backend/GenericsCodegen.jrag:524")
public String fieldTypeSignature() {
ASTState state = state();
if (fieldTypeSignature_computed == ASTState.NON_CYCLE || fieldTypeSignature_computed == state().cycle()) {
return fieldTypeSignature_value;
}
fieldTypeSignature_value = "[" + componentType().fieldTypeSignature();
if (state().inCircle()) {
fieldTypeSignature_computed = state().cycle();
} else {
fieldTypeSignature_computed = ASTState.NON_CYCLE;
}
return fieldTypeSignature_value;
}
/** @apilevel internal */
private void classTypeSignature_reset() {
classTypeSignature_computed = null;
classTypeSignature_value = null;
}
/** @apilevel internal */
protected ASTState.Cycle classTypeSignature_computed = null;
/** @apilevel internal */
protected String classTypeSignature_value;
/**
* @attribute syn
* @aspect GenericsCodegen
* @declaredat /home/jesper/git/extendj/java5/backend/GenericsCodegen.jrag:533
*/
@ASTNodeAnnotation.Attribute(kind=ASTNodeAnnotation.Kind.SYN)
@ASTNodeAnnotation.Source(aspect="GenericsCodegen", declaredAt="/home/jesper/git/extendj/java5/backend/GenericsCodegen.jrag:533")
public String classTypeSignature() {
ASTState state = state();
if (classTypeSignature_computed == ASTState.NON_CYCLE || classTypeSignature_computed == state().cycle()) {
return classTypeSignature_value;
}
classTypeSignature_value = "[" + componentType().classTypeSignature();
if (state().inCircle()) {
classTypeSignature_computed = state().cycle();
} else {
classTypeSignature_computed = ASTState.NON_CYCLE;
}
return classTypeSignature_value;
}
/**
* @attribute inh
* @aspect TypeConversion
* @declaredat /home/jesper/git/extendj/java4/frontend/TypeAnalysis.jrag:150
*/
@ASTNodeAnnotation.Attribute(kind=ASTNodeAnnotation.Kind.INH)
@ASTNodeAnnotation.Source(aspect="TypeConversion", declaredAt="/home/jesper/git/extendj/java4/frontend/TypeAnalysis.jrag:150")
public TypeDecl typeSerializable() {
TypeDecl typeSerializable_value = getParent().Define_typeSerializable(this, null);
return typeSerializable_value;
}
/**
* @attribute inh
* @aspect TypeConversion
* @declaredat /home/jesper/git/extendj/java4/frontend/TypeAnalysis.jrag:151
*/
@ASTNodeAnnotation.Attribute(kind=ASTNodeAnnotation.Kind.INH)
@ASTNodeAnnotation.Source(aspect="TypeConversion", declaredAt="/home/jesper/git/extendj/java4/frontend/TypeAnalysis.jrag:151")
public TypeDecl typeCloneable() {
TypeDecl typeCloneable_value = getParent().Define_typeCloneable(this, null);
return typeCloneable_value;
}
/** @apilevel internal */
public ASTNode rewriteTo() {
return super.rewriteTo();
}
/** @apilevel internal */
public boolean canRewrite() {
return false;
}
}