org.extendj.ast.ElementValue Maven / Gradle / Ivy
The newest version!
/* 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/Annotations.ast:10
* @astdecl ElementValue : ASTNode;
* @production ElementValue : {@link ASTNode};
*/
public abstract class ElementValue extends ASTNode implements Cloneable {
/**
* @aspect AnnotationsCodegen
* @declaredat /home/jesper/git/extendj/java5/backend/AnnotationsCodegen.jrag:266
*/
public void appendAsAttributeTo(Attribute buf) {
throw new Error(getClass().getName() + " does not support appendAsAttributeTo(Attribute buf)");
}
/**
* @declaredat ASTNode:1
*/
public ElementValue() {
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() {
}
/** @apilevel low-level
* @declaredat ASTNode:13
*/
protected int numChildren() {
return 0;
}
/**
* @apilevel internal
* @declaredat ASTNode:19
*/
public boolean mayHaveRewrite() {
return false;
}
/** @apilevel internal
* @declaredat ASTNode:23
*/
public void flushAttrCache() {
super.flushAttrCache();
}
/** @apilevel internal
* @declaredat ASTNode:27
*/
public void flushCollectionCache() {
super.flushCollectionCache();
}
/** @apilevel internal
* @declaredat ASTNode:31
*/
public ElementValue clone() throws CloneNotSupportedException {
ElementValue node = (ElementValue) super.clone();
return node;
}
/**
* 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:42
*/
@Deprecated
public abstract ElementValue fullCopy();
/**
* 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:50
*/
public abstract ElementValue treeCopyNoTransform();
/**
* 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:58
*/
public abstract ElementValue treeCopy();
/**
* @attribute syn
* @aspect Annotations
* @declaredat /home/jesper/git/extendj/java5/frontend/Annotations.jrag:111
*/
@ASTNodeAnnotation.Attribute(kind=ASTNodeAnnotation.Kind.SYN)
@ASTNodeAnnotation.Source(aspect="Annotations", declaredAt="/home/jesper/git/extendj/java5/frontend/Annotations.jrag:111")
public boolean validTarget(Annotation a) {
boolean validTarget_Annotation_value = false;
return validTarget_Annotation_value;
}
/**
* @attribute syn
* @aspect Annotations
* @declaredat /home/jesper/git/extendj/java5/frontend/Annotations.jrag:285
*/
@ASTNodeAnnotation.Attribute(kind=ASTNodeAnnotation.Kind.SYN)
@ASTNodeAnnotation.Source(aspect="Annotations", declaredAt="/home/jesper/git/extendj/java5/frontend/Annotations.jrag:285")
public ElementValue definesElementTypeValue(String name) {
ElementValue definesElementTypeValue_String_value = null;
return definesElementTypeValue_String_value;
}
/**
* @attribute syn
* @aspect Annotations
* @declaredat /home/jesper/git/extendj/java5/frontend/Annotations.jrag:448
*/
@ASTNodeAnnotation.Attribute(kind=ASTNodeAnnotation.Kind.SYN)
@ASTNodeAnnotation.Source(aspect="Annotations", declaredAt="/home/jesper/git/extendj/java5/frontend/Annotations.jrag:448")
public boolean hasValue(String annot) {
boolean hasValue_String_value = false;
return hasValue_String_value;
}
/**
* @attribute syn
* @aspect Annotations
* @declaredat /home/jesper/git/extendj/java5/frontend/Annotations.jrag:675
*/
@ASTNodeAnnotation.Attribute(kind=ASTNodeAnnotation.Kind.SYN)
@ASTNodeAnnotation.Source(aspect="Annotations", declaredAt="/home/jesper/git/extendj/java5/frontend/Annotations.jrag:675")
public boolean commensurateWithTypeDecl(TypeDecl type) {
boolean commensurateWithTypeDecl_TypeDecl_value = false;
return commensurateWithTypeDecl_TypeDecl_value;
}
/**
* @attribute syn
* @aspect Annotations
* @declaredat /home/jesper/git/extendj/java5/frontend/Annotations.jrag:703
*/
@ASTNodeAnnotation.Attribute(kind=ASTNodeAnnotation.Kind.SYN)
@ASTNodeAnnotation.Source(aspect="Annotations", declaredAt="/home/jesper/git/extendj/java5/frontend/Annotations.jrag:703")
public boolean commensurateWithArrayDecl(ArrayDecl type) {
boolean commensurateWithArrayDecl_ArrayDecl_value = type.componentType().commensurateWith(this);
return commensurateWithArrayDecl_ArrayDecl_value;
}
/**
* @attribute syn
* @aspect Annotations
* @declaredat /home/jesper/git/extendj/java5/frontend/Annotations.jrag:731
*/
@ASTNodeAnnotation.Attribute(kind=ASTNodeAnnotation.Kind.SYN)
@ASTNodeAnnotation.Source(aspect="Annotations", declaredAt="/home/jesper/git/extendj/java5/frontend/Annotations.jrag:731")
public TypeDecl type() {
TypeDecl type_value = unknownType();
return type_value;
}
/**
* @attribute inh
* @aspect Annotations
* @declaredat /home/jesper/git/extendj/java5/frontend/Annotations.jrag:648
*/
@ASTNodeAnnotation.Attribute(kind=ASTNodeAnnotation.Kind.INH)
@ASTNodeAnnotation.Source(aspect="Annotations", declaredAt="/home/jesper/git/extendj/java5/frontend/Annotations.jrag:648")
public TypeDecl enclosingAnnotationDecl() {
TypeDecl enclosingAnnotationDecl_value = getParent().Define_enclosingAnnotationDecl(this, null);
return enclosingAnnotationDecl_value;
}
/**
* @attribute inh
* @aspect Annotations
* @declaredat /home/jesper/git/extendj/java5/frontend/Annotations.jrag:723
*/
@ASTNodeAnnotation.Attribute(kind=ASTNodeAnnotation.Kind.INH)
@ASTNodeAnnotation.Source(aspect="Annotations", declaredAt="/home/jesper/git/extendj/java5/frontend/Annotations.jrag:723")
public TypeDecl declType() {
TypeDecl declType_value = getParent().Define_declType(this, null);
return declType_value;
}
/**
* @attribute inh
* @aspect Annotations
* @declaredat /home/jesper/git/extendj/java5/frontend/Annotations.jrag:739
*/
@ASTNodeAnnotation.Attribute(kind=ASTNodeAnnotation.Kind.INH)
@ASTNodeAnnotation.Source(aspect="Annotations", declaredAt="/home/jesper/git/extendj/java5/frontend/Annotations.jrag:739")
public TypeDecl unknownType() {
TypeDecl unknownType_value = getParent().Define_unknownType(this, null);
return unknownType_value;
}
/**
* @attribute inh
* @aspect AnnotationsCodegen
* @declaredat /home/jesper/git/extendj/java5/backend/AnnotationsCodegen.jrag:332
*/
@ASTNodeAnnotation.Attribute(kind=ASTNodeAnnotation.Kind.INH)
@ASTNodeAnnotation.Source(aspect="AnnotationsCodegen", declaredAt="/home/jesper/git/extendj/java5/backend/AnnotationsCodegen.jrag:332")
public TypeDecl hostType() {
TypeDecl hostType_value = getParent().Define_hostType(this, null);
return hostType_value;
}
/**
* @declaredat /home/jesper/git/extendj/java4/frontend/ResolveAmbiguousNames.jrag:86
* @apilevel internal
*/
public boolean Define_isLeftChildOfDot(ASTNode _callerNode, ASTNode _childNode) {
int childIndex = this.getIndexOfChild(_callerNode);
return false;
}
/**
* @declaredat /home/jesper/git/extendj/java4/frontend/ResolveAmbiguousNames.jrag:86
* @apilevel internal
* @return {@code true} if this node has an equation for the inherited attribute isLeftChildOfDot
*/
protected boolean canDefine_isLeftChildOfDot(ASTNode _callerNode, ASTNode _childNode) {
return true;
}
/**
* @declaredat /home/jesper/git/extendj/java4/frontend/ResolveAmbiguousNames.jrag:101
* @apilevel internal
*/
public boolean Define_isRightChildOfDot(ASTNode _callerNode, ASTNode _childNode) {
int childIndex = this.getIndexOfChild(_callerNode);
return false;
}
/**
* @declaredat /home/jesper/git/extendj/java4/frontend/ResolveAmbiguousNames.jrag:101
* @apilevel internal
* @return {@code true} if this node has an equation for the inherited attribute isRightChildOfDot
*/
protected boolean canDefine_isRightChildOfDot(ASTNode _callerNode, ASTNode _childNode) {
return true;
}
/**
* @declaredat /home/jesper/git/extendj/java4/frontend/ResolveAmbiguousNames.jrag:118
* @apilevel internal
*/
public Expr Define_prevExpr(ASTNode _callerNode, ASTNode _childNode) {
int childIndex = this.getIndexOfChild(_callerNode);
return prevExprError();
}
/**
* @declaredat /home/jesper/git/extendj/java4/frontend/ResolveAmbiguousNames.jrag:118
* @apilevel internal
* @return {@code true} if this node has an equation for the inherited attribute prevExpr
*/
protected boolean canDefine_prevExpr(ASTNode _callerNode, ASTNode _childNode) {
return true;
}
/**
* @declaredat /home/jesper/git/extendj/java4/frontend/ResolveAmbiguousNames.jrag:142
* @apilevel internal
*/
public Access Define_nextAccess(ASTNode _callerNode, ASTNode _childNode) {
int childIndex = this.getIndexOfChild(_callerNode);
return nextAccessError();
}
/**
* @declaredat /home/jesper/git/extendj/java4/frontend/ResolveAmbiguousNames.jrag:142
* @apilevel internal
* @return {@code true} if this node has an equation for the inherited attribute nextAccess
*/
protected boolean canDefine_nextAccess(ASTNode _callerNode, ASTNode _childNode) {
return true;
}
/** @apilevel internal */
public ASTNode rewriteTo() {
return super.rewriteTo();
}
/** @apilevel internal */
public boolean canRewrite() {
return false;
}
}