org.extendj.ast.GenericInterfaceDeclSubstituted Maven / Gradle / Ivy
/* This file was generated with JastAdd2 (http://jastadd.org) version 2.3.0 */
package org.extendj.ast;
import java.util.Collection;
import java.util.Collections;
import java.util.HashSet;
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.*;
import java.util.zip.*;
import java.io.*;
import org.jastadd.util.PrettyPrintable;
import org.jastadd.util.PrettyPrinter;
import org.jastadd.util.*;
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.io.BufferedInputStream;
import java.io.DataInputStream;
/**
* @ast node
* @declaredat /home/jesper/git/extendj/java5/grammar/Generics.ast:114
* @astdecl GenericInterfaceDeclSubstituted : GenericInterfaceDecl ::= ;
* @production GenericInterfaceDeclSubstituted : {@link GenericInterfaceDecl} ::= <Original:TypeDecl>;
*/
public class GenericInterfaceDeclSubstituted extends GenericInterfaceDecl implements Cloneable, MemberSubstitutor {
/**
* @declaredat ASTNode:1
*/
public GenericInterfaceDeclSubstituted() {
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[4];
setChild(new List(), 1);
setChild(new List(), 2);
setChild(new List(), 3);
}
/**
* @declaredat ASTNode:16
*/
@ASTNodeAnnotation.Constructor(
name = {"Modifiers", "ID", "SuperInterface", "BodyDecl", "TypeParameter", "Original"},
type = {"Modifiers", "String", "List", "List", "List", "TypeDecl"},
kind = {"Child", "Token", "List", "List", "List", "Token"}
)
public GenericInterfaceDeclSubstituted(Modifiers p0, String p1, List p2, List p3, List p4, TypeDecl p5) {
setChild(p0, 0);
setID(p1);
setChild(p2, 1);
setChild(p3, 2);
setChild(p4, 3);
setOriginal(p5);
}
/**
* @declaredat ASTNode:29
*/
public GenericInterfaceDeclSubstituted(Modifiers p0, beaver.Symbol p1, List p2, List p3, List p4, TypeDecl p5) {
setChild(p0, 0);
setID(p1);
setChild(p2, 1);
setChild(p3, 2);
setChild(p4, 3);
setOriginal(p5);
}
/** @apilevel low-level
* @declaredat ASTNode:38
*/
protected int numChildren() {
return 4;
}
/**
* @apilevel internal
* @declaredat ASTNode:44
*/
public boolean mayHaveRewrite() {
return false;
}
/** @apilevel internal
* @declaredat ASTNode:48
*/
public void flushAttrCache() {
super.flushAttrCache();
sourceTypeDecl_reset();
instanceOf_TypeDecl_reset();
subtype_TypeDecl_reset();
typeDescriptor_reset();
constantPoolName_reset();
uniqueIndex_reset();
localMethodsSignatureMap_reset();
localFields_String_reset();
localTypeDecls_String_reset();
}
/** @apilevel internal
* @declaredat ASTNode:61
*/
public void flushCollectionCache() {
super.flushCollectionCache();
}
/** @apilevel internal
* @declaredat ASTNode:65
*/
public GenericInterfaceDeclSubstituted clone() throws CloneNotSupportedException {
GenericInterfaceDeclSubstituted node = (GenericInterfaceDeclSubstituted) super.clone();
return node;
}
/** @apilevel internal
* @declaredat ASTNode:70
*/
public GenericInterfaceDeclSubstituted copy() {
try {
GenericInterfaceDeclSubstituted node = (GenericInterfaceDeclSubstituted) 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:89
*/
@Deprecated
public GenericInterfaceDeclSubstituted 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:99
*/
public GenericInterfaceDeclSubstituted treeCopyNoTransform() {
GenericInterfaceDeclSubstituted tree = (GenericInterfaceDeclSubstituted) 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:119
*/
public GenericInterfaceDeclSubstituted treeCopy() {
GenericInterfaceDeclSubstituted tree = (GenericInterfaceDeclSubstituted) 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:133
*/
protected boolean is$Equal(ASTNode node) {
return super.is$Equal(node) && (tokenString_ID == ((GenericInterfaceDeclSubstituted) node).tokenString_ID) && (tokenTypeDecl_Original == ((GenericInterfaceDeclSubstituted) node).tokenTypeDecl_Original);
}
/**
* 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 SuperInterface list.
* @param list The new list node to be used as the SuperInterface list.
* @apilevel high-level
*/
public void setSuperInterfaceList(List list) {
setChild(list, 1);
}
/**
* Retrieves the number of children in the SuperInterface list.
* @return Number of children in the SuperInterface list.
* @apilevel high-level
*/
public int getNumSuperInterface() {
return getSuperInterfaceList().getNumChild();
}
/**
* Retrieves the number of children in the SuperInterface list.
* Calling this method will not trigger rewrites.
* @return Number of children in the SuperInterface list.
* @apilevel low-level
*/
public int getNumSuperInterfaceNoTransform() {
return getSuperInterfaceListNoTransform().getNumChildNoTransform();
}
/**
* Retrieves the element at index {@code i} in the SuperInterface list.
* @param i Index of the element to return.
* @return The element at position {@code i} in the SuperInterface list.
* @apilevel high-level
*/
public Access getSuperInterface(int i) {
return (Access) getSuperInterfaceList().getChild(i);
}
/**
* Check whether the SuperInterface list has any children.
* @return {@code true} if it has at least one child, {@code false} otherwise.
* @apilevel high-level
*/
public boolean hasSuperInterface() {
return getSuperInterfaceList().getNumChild() != 0;
}
/**
* Append an element to the SuperInterface list.
* @param node The element to append to the SuperInterface list.
* @apilevel high-level
*/
public void addSuperInterface(Access node) {
List list = (parent == null) ? getSuperInterfaceListNoTransform() : getSuperInterfaceList();
list.addChild(node);
}
/** @apilevel low-level
*/
public void addSuperInterfaceNoTransform(Access node) {
List list = getSuperInterfaceListNoTransform();
list.addChild(node);
}
/**
* Replaces the SuperInterface 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 setSuperInterface(Access node, int i) {
List list = getSuperInterfaceList();
list.setChild(node, i);
}
/**
* Retrieves the SuperInterface list.
* @return The node representing the SuperInterface list.
* @apilevel high-level
*/
@ASTNodeAnnotation.ListChild(name="SuperInterface")
public List getSuperInterfaceList() {
List list = (List) getChild(1);
return list;
}
/**
* Retrieves the SuperInterface list.
* This method does not invoke AST transformations.
* @return The node representing the SuperInterface list.
* @apilevel low-level
*/
public List getSuperInterfaceListNoTransform() {
return (List) getChildNoTransform(1);
}
/**
* @return the element at index {@code i} in the SuperInterface list without
* triggering rewrites.
*/
public Access getSuperInterfaceNoTransform(int i) {
return (Access) getSuperInterfaceListNoTransform().getChildNoTransform(i);
}
/**
* Retrieves the SuperInterface list.
* @return The node representing the SuperInterface list.
* @apilevel high-level
*/
public List getSuperInterfaces() {
return getSuperInterfaceList();
}
/**
* Retrieves the SuperInterface list.
* This method does not invoke AST transformations.
* @return The node representing the SuperInterface list.
* @apilevel low-level
*/
public List getSuperInterfacesNoTransform() {
return getSuperInterfaceListNoTransform();
}
/**
* 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, 2);
}
/**
* 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(2);
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(2);
}
/**
* @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 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, 3);
}
/**
* 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(3);
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(3);
}
/**
* @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 Original.
* @param value The new value for the lexeme Original.
* @apilevel high-level
*/
public void setOriginal(TypeDecl value) {
tokenTypeDecl_Original = value;
}
/** @apilevel internal
*/
protected TypeDecl tokenTypeDecl_Original;
/**
* Retrieves the value for the lexeme Original.
* @return The value for the lexeme Original.
* @apilevel high-level
*/
@ASTNodeAnnotation.Token(name="Original")
public TypeDecl getOriginal() {
return tokenTypeDecl_Original;
}
/**
* @attribute syn
* @aspect NestedTypes
* @declaredat /home/jesper/git/extendj/java4/frontend/TypeAnalysis.jrag:643
*/
@ASTNodeAnnotation.Attribute(kind=ASTNodeAnnotation.Kind.SYN)
@ASTNodeAnnotation.Source(aspect="NestedTypes", declaredAt="/home/jesper/git/extendj/java4/frontend/TypeAnalysis.jrag:643")
public TypeDecl hostType() {
TypeDecl hostType_value = getOriginal();
return hostType_value;
}
/**
* @attribute syn
* @aspect LookupParTypeDecl
* @declaredat /home/jesper/git/extendj/java5/frontend/Generics.jrag:1665
*/
@ASTNodeAnnotation.Attribute(kind=ASTNodeAnnotation.Kind.SYN)
@ASTNodeAnnotation.Source(aspect="LookupParTypeDecl", declaredAt="/home/jesper/git/extendj/java5/frontend/Generics.jrag:1665")
public TypeDecl original() {
TypeDecl original_value = getOriginal().original();
return original_value;
}
/** @apilevel internal */
private void sourceTypeDecl_reset() {
sourceTypeDecl_computed = null;
sourceTypeDecl_value = null;
}
/** @apilevel internal */
protected ASTState.Cycle sourceTypeDecl_computed = null;
/** @apilevel internal */
protected TypeDecl sourceTypeDecl_value;
/**
* @attribute syn
* @aspect SourceDeclarations
* @declaredat /home/jesper/git/extendj/java5/frontend/Generics.jrag:1880
*/
@ASTNodeAnnotation.Attribute(kind=ASTNodeAnnotation.Kind.SYN)
@ASTNodeAnnotation.Source(aspect="SourceDeclarations", declaredAt="/home/jesper/git/extendj/java5/frontend/Generics.jrag:1880")
public TypeDecl sourceTypeDecl() {
ASTState state = state();
if (sourceTypeDecl_computed == ASTState.NON_CYCLE || sourceTypeDecl_computed == state().cycle()) {
return sourceTypeDecl_value;
}
sourceTypeDecl_value = original().sourceTypeDecl();
if (state().inCircle()) {
sourceTypeDecl_computed = state().cycle();
} else {
sourceTypeDecl_computed = ASTState.NON_CYCLE;
}
return sourceTypeDecl_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:443
*/
@ASTNodeAnnotation.Attribute(kind=ASTNodeAnnotation.Kind.SYN)
@ASTNodeAnnotation.Source(aspect="TypeWideningAndIdentity", declaredAt="/home/jesper/git/extendj/java4/frontend/TypeAnalysis.jrag:443")
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 = subtype(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 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:492")
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.supertypeGenericInterfaceDeclSubstituted(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.supertypeGenericInterfaceDeclSubstituted(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:634
*/
@ASTNodeAnnotation.Attribute(kind=ASTNodeAnnotation.Kind.SYN)
@ASTNodeAnnotation.Source(aspect="GenericsSubtype", declaredAt="/home/jesper/git/extendj/java5/frontend/GenericsSubtype.jrag:634")
public boolean supertypeGenericInterfaceDeclSubstituted(GenericInterfaceDeclSubstituted type) {
boolean supertypeGenericInterfaceDeclSubstituted_GenericInterfaceDeclSubstituted_value = original() == type.original() && type.enclosingType().subtype(enclosingType())
|| super.supertypeGenericInterfaceDeclSubstituted(type);
return supertypeGenericInterfaceDeclSubstituted_GenericInterfaceDeclSubstituted_value;
}
/**
* @attribute syn
* @aspect GenericsSubtype
* @declaredat /home/jesper/git/extendj/java5/frontend/GenericsSubtype.jrag:43
*/
@ASTNodeAnnotation.Attribute(kind=ASTNodeAnnotation.Kind.SYN)
@ASTNodeAnnotation.Source(aspect="GenericsSubtype", declaredAt="/home/jesper/git/extendj/java5/frontend/GenericsSubtype.jrag:43")
public boolean supertypeGenericInterfaceDecl(GenericInterfaceDecl type) {
boolean supertypeGenericInterfaceDecl_GenericInterfaceDecl_value = super.supertypeGenericInterfaceDecl(type) || original().supertypeGenericInterfaceDecl(type);
return supertypeGenericInterfaceDecl_GenericInterfaceDecl_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 = original().typeDescriptor();
if (state().inCircle()) {
typeDescriptor_computed = state().cycle();
} else {
typeDescriptor_computed = ASTState.NON_CYCLE;
}
return typeDescriptor_value;
}
/** @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;
/**
* For a top-level type the constant pool name of the type is the same as the
* canonical name but with dots replaced by solidus.
*
* For nested types the constant pool name is based on the enclosing top-level
* types constant pool name followed by a dollar sign and a unique index and/or
* the type name.
*
* @return constant pool name of this type
* @attribute syn
* @aspect ConstantPoolNames
* @declaredat /home/jesper/git/extendj/java4/backend/ConstantPoolNames.jrag:44
*/
@ASTNodeAnnotation.Attribute(kind=ASTNodeAnnotation.Kind.SYN)
@ASTNodeAnnotation.Source(aspect="ConstantPoolNames", declaredAt="/home/jesper/git/extendj/java4/backend/ConstantPoolNames.jrag:44")
public String constantPoolName() {
ASTState state = state();
if (constantPoolName_computed == ASTState.NON_CYCLE || constantPoolName_computed == state().cycle()) {
return constantPoolName_value;
}
constantPoolName_value = original().constantPoolName();
if (state().inCircle()) {
constantPoolName_computed = state().cycle();
} else {
constantPoolName_computed = ASTState.NON_CYCLE;
}
return constantPoolName_value;
}
/** @apilevel internal */
private void uniqueIndex_reset() {
uniqueIndex_computed = null;
}
/** @apilevel internal */
protected ASTState.Cycle uniqueIndex_computed = null;
/** @apilevel internal */
protected int uniqueIndex_value;
/**
* @attribute syn
* @aspect Java2Rewrites
* @declaredat /home/jesper/git/extendj/java4/backend/Java2Rewrites.jrag:35
*/
@ASTNodeAnnotation.Attribute(kind=ASTNodeAnnotation.Kind.SYN)
@ASTNodeAnnotation.Source(aspect="Java2Rewrites", declaredAt="/home/jesper/git/extendj/java4/backend/Java2Rewrites.jrag:35")
public int uniqueIndex() {
ASTState state = state();
if (uniqueIndex_computed == ASTState.NON_CYCLE || uniqueIndex_computed == state().cycle()) {
return uniqueIndex_value;
}
uniqueIndex_value = original().uniqueIndex();
if (state().inCircle()) {
uniqueIndex_computed = state().cycle();
} else {
uniqueIndex_computed = ASTState.NON_CYCLE;
}
return uniqueIndex_value;
}
/**
* @attribute syn
* @aspect CreateBCode
* @declaredat /home/jesper/git/extendj/java4/backend/CreateBCode.jrag:995
*/
@ASTNodeAnnotation.Attribute(kind=ASTNodeAnnotation.Kind.SYN)
@ASTNodeAnnotation.Source(aspect="CreateBCode", declaredAt="/home/jesper/git/extendj/java4/backend/CreateBCode.jrag:995")
public String arrayTypeDescriptor() {
String arrayTypeDescriptor_value = original().arrayTypeDescriptor();
return arrayTypeDescriptor_value;
}
/** @apilevel internal */
private void localMethodsSignatureMap_reset() {
localMethodsSignatureMap_computed = null;
localMethodsSignatureMap_value = null;
}
/** @apilevel internal */
protected ASTState.Cycle localMethodsSignatureMap_computed = null;
/** @apilevel internal */
protected Map> localMethodsSignatureMap_value;
/**
* @attribute syn
* @aspect LookupParTypeDecl
* @declaredat /home/jesper/git/extendj/java5/frontend/Generics.jrag:1347
*/
@ASTNodeAnnotation.Attribute(kind=ASTNodeAnnotation.Kind.SYN)
@ASTNodeAnnotation.Source(aspect="LookupParTypeDecl", declaredAt="/home/jesper/git/extendj/java5/frontend/Generics.jrag:1347")
public Map> localMethodsSignatureMap() {
ASTState state = state();
if (localMethodsSignatureMap_computed == ASTState.NON_CYCLE || localMethodsSignatureMap_computed == state().cycle()) {
return localMethodsSignatureMap_value;
}
localMethodsSignatureMap_value = localMethodsSignatureMap_compute();
if (state().inCircle()) {
localMethodsSignatureMap_computed = state().cycle();
} else {
localMethodsSignatureMap_computed = ASTState.NON_CYCLE;
}
return localMethodsSignatureMap_value;
}
/** @apilevel internal */
private Map> localMethodsSignatureMap_compute() {
Map> map = new HashMap>();
for (Iterator iter = original().localMethodsIterator(); iter.hasNext(); ) {
MethodDecl decl = iter.next();
if (!decl.isSubstitutable()) {
putSimpleSetElement(map, decl.signature(), decl);
}
}
for (BodyDecl decl : getBodyDeclList()) {
if (decl instanceof MethodDecl) {
MethodDecl method = (MethodDecl) decl;
putSimpleSetElement(map, method.signature(), method);
}
}
return map;
}
/** @apilevel internal */
private void localFields_String_reset() {
localFields_String_computed = null;
localFields_String_values = null;
}
/** @apilevel internal */
protected java.util.Map localFields_String_values;
/** @apilevel internal */
protected java.util.Map localFields_String_computed;
/**
* @attribute syn
* @aspect LookupParTypeDecl
* @declaredat /home/jesper/git/extendj/java5/frontend/Generics.jrag:1364
*/
@ASTNodeAnnotation.Attribute(kind=ASTNodeAnnotation.Kind.SYN)
@ASTNodeAnnotation.Source(aspect="LookupParTypeDecl", declaredAt="/home/jesper/git/extendj/java5/frontend/Generics.jrag:1364")
public SimpleSet localFields(String name) {
Object _parameters = name;
if (localFields_String_computed == null) localFields_String_computed = new java.util.HashMap(4);
if (localFields_String_values == null) localFields_String_values = new java.util.HashMap(4);
ASTState state = state();
if (localFields_String_values.containsKey(_parameters)
&& localFields_String_computed.containsKey(_parameters)
&& (localFields_String_computed.get(_parameters) == ASTState.NON_CYCLE || localFields_String_computed.get(_parameters) == state().cycle())) {
return (SimpleSet) localFields_String_values.get(_parameters);
}
SimpleSet localFields_String_value = localFields_compute(name);
if (state().inCircle()) {
localFields_String_values.put(_parameters, localFields_String_value);
localFields_String_computed.put(_parameters, state().cycle());
} else {
localFields_String_values.put(_parameters, localFields_String_value);
localFields_String_computed.put(_parameters, ASTState.NON_CYCLE);
}
return localFields_String_value;
}
/** @apilevel internal */
private SimpleSet localFields_compute(String name) {
SimpleSet set = emptySet();
for (Variable field : original().localFields(name)) {
if (field.name().equals(name)
&& field.fieldDecl() != null && !field.fieldDecl().isSubstitutable()) {
set = set.add(field);
}
}
for (BodyDecl decl : getBodyDeclList()) {
if (decl instanceof FieldDecl) {
FieldDecl field = (FieldDecl) decl;
for (FieldDeclarator f : field.getDeclaratorList()) {
if (f.name().equals(name)) {
set = set.add(f);
}
}
}
}
return set;
}
/** @apilevel internal */
private void localTypeDecls_String_reset() {
localTypeDecls_String_values = null;
}
protected java.util.Map localTypeDecls_String_values;
@ASTNodeAnnotation.Attribute(kind=ASTNodeAnnotation.Kind.SYN, isCircular=true)
@ASTNodeAnnotation.Source(aspect="LookupParTypeDecl", declaredAt="/home/jesper/git/extendj/java5/frontend/Generics.jrag:1395")
public SimpleSet localTypeDecls(String name) {
Object _parameters = name;
if (localTypeDecls_String_values == null) localTypeDecls_String_values = new java.util.HashMap(4);
ASTState.CircularValue _value;
if (localTypeDecls_String_values.containsKey(_parameters)) {
Object _cache = localTypeDecls_String_values.get(_parameters);
if (!(_cache instanceof ASTState.CircularValue)) {
return (SimpleSet) _cache;
} else {
_value = (ASTState.CircularValue) _cache;
}
} else {
_value = new ASTState.CircularValue();
localTypeDecls_String_values.put(_parameters, _value);
_value.value = emptySet();
}
ASTState state = state();
if (!state.inCircle() || state.calledByLazyAttribute()) {
state.enterCircle();
SimpleSet new_localTypeDecls_String_value;
do {
_value.cycle = state.nextCycle();
new_localTypeDecls_String_value = localTypeDecls_compute(name);
if (!AttributeValue.equals(((SimpleSet)_value.value), new_localTypeDecls_String_value)) {
state.setChangeInCycle();
_value.value = new_localTypeDecls_String_value;
}
} while (state.testAndClearChangeInCycle());
localTypeDecls_String_values.put(_parameters, new_localTypeDecls_String_value);
state.leaveCircle();
return new_localTypeDecls_String_value;
} else if (_value.cycle != state.cycle()) {
_value.cycle = state.cycle();
SimpleSet new_localTypeDecls_String_value = localTypeDecls_compute(name);
if (!AttributeValue.equals(((SimpleSet)_value.value), new_localTypeDecls_String_value)) {
state.setChangeInCycle();
_value.value = new_localTypeDecls_String_value;
}
return new_localTypeDecls_String_value;
} else {
return (SimpleSet) _value.value;
}
}
/** @apilevel internal */
private SimpleSet localTypeDecls_compute(String name) {
SimpleSet set = emptySet();
for (TypeDecl type : original().localTypeDecls(name)) {
if (type.isStatic()) {
set = set.add(type);
}
}
for (BodyDecl decl : getBodyDeclList()) {
if (decl instanceof MemberClassDecl) {
ClassDecl typeDecl = ((MemberClassDecl) decl).getClassDecl();
if (typeDecl.name().equals(name)) {
set = set.add(typeDecl);
}
}
}
return set;
}
/** @apilevel internal */
public ASTNode rewriteTo() {
return super.rewriteTo();
}
/** @apilevel internal */
public boolean canRewrite() {
return false;
}
}