001 /* This file was generated with JastAdd2 (http://jastadd.org) version 2.1.13-12-g880e696 */ 002 package org.extendj.ast; 003 004 import java.util.HashSet; 005 import java.io.File; 006 import java.util.Set; 007 import java.util.Collections; 008 import java.util.Collection; 009 import java.util.ArrayList; 010 import beaver.*; 011 import java.util.*; 012 import java.io.ByteArrayOutputStream; 013 import java.io.PrintStream; 014 import java.lang.reflect.InvocationTargetException; 015 import java.lang.reflect.Method; 016 import org.jastadd.util.*; 017 import java.util.zip.*; 018 import java.io.*; 019 import org.jastadd.util.PrettyPrintable; 020 import org.jastadd.util.PrettyPrinter; 021 import java.io.FileNotFoundException; 022 import java.io.BufferedInputStream; 023 import java.io.DataInputStream; 024 /** 025 * @ast node 026 * @declaredat /home/jesper/git/extendj/java5/grammar/Annotations.ast:10 027 * @production ElementValue : {@link ASTNode}; 028 029 */ 030 public abstract class ElementValue extends ASTNode<ASTNode> implements Cloneable { 031 /** 032 * @aspect AnnotationsCodegen 033 * @declaredat /home/jesper/git/extendj/java5/backend/AnnotationsCodegen.jrag:231 034 */ 035 public void appendAsAttributeTo(Attribute buf) { 036 throw new Error(getClass().getName() + " does not support appendAsAttributeTo(Attribute buf)"); 037 } 038 /** 039 * @declaredat ASTNode:1 040 */ 041 public ElementValue() { 042 super(); 043 } 044 /** 045 * Initializes the child array to the correct size. 046 * Initializes List and Opt nta children. 047 * @apilevel internal 048 * @ast method 049 * @declaredat ASTNode:10 050 */ 051 public void init$Children() { 052 } 053 /** 054 * @apilevel low-level 055 * @declaredat ASTNode:15 056 */ 057 protected int numChildren() { 058 return 0; 059 } 060 /** 061 * @apilevel internal 062 * @declaredat ASTNode:21 063 */ 064 public boolean mayHaveRewrite() { 065 return false; 066 } 067 /** 068 * @apilevel internal 069 * @declaredat ASTNode:27 070 */ 071 public void flushAttrCache() { 072 super.flushAttrCache(); 073 } 074 /** 075 * @apilevel internal 076 * @declaredat ASTNode:33 077 */ 078 public void flushCollectionCache() { 079 super.flushCollectionCache(); 080 } 081 /** 082 * @apilevel internal 083 * @declaredat ASTNode:39 084 */ 085 public void flushRewriteCache() { 086 super.flushRewriteCache(); 087 } 088 /** 089 * @apilevel internal 090 * @declaredat ASTNode:45 091 */ 092 public ElementValue clone() throws CloneNotSupportedException { 093 ElementValue node = (ElementValue) super.clone(); 094 return node; 095 } 096 /** 097 * Create a deep copy of the AST subtree at this node. 098 * The copy is dangling, i.e. has no parent. 099 * @return dangling copy of the subtree at this node 100 * @apilevel low-level 101 * @deprecated Please use treeCopy or treeCopyNoTransform instead 102 * @declaredat ASTNode:56 103 */ 104 @Deprecated 105 public abstract ElementValue fullCopy(); 106 /** 107 * Create a deep copy of the AST subtree at this node. 108 * The copy is dangling, i.e. has no parent. 109 * @return dangling copy of the subtree at this node 110 * @apilevel low-level 111 * @declaredat ASTNode:64 112 */ 113 public abstract ElementValue treeCopyNoTransform(); 114 /** 115 * Create a deep copy of the AST subtree at this node. 116 * The subtree of this node is traversed to trigger rewrites before copy. 117 * The copy is dangling, i.e. has no parent. 118 * @return dangling copy of the subtree at this node 119 * @apilevel low-level 120 * @declaredat ASTNode:72 121 */ 122 public abstract ElementValue treeCopy(); 123 /** 124 * @attribute syn 125 * @aspect Annotations 126 * @declaredat /home/jesper/git/extendj/java5/frontend/Annotations.jrag:80 127 */ 128 @ASTNodeAnnotation.Attribute 129 public boolean validTarget(Annotation a) { 130 boolean validTarget_Annotation_value = false; 131 132 return validTarget_Annotation_value; 133 } 134 /** 135 * @attribute syn 136 * @aspect Annotations 137 * @declaredat /home/jesper/git/extendj/java5/frontend/Annotations.jrag:228 138 */ 139 @ASTNodeAnnotation.Attribute 140 public ElementValue definesElementTypeValue(String name) { 141 ElementValue definesElementTypeValue_String_value = null; 142 143 return definesElementTypeValue_String_value; 144 } 145 /** 146 * @attribute syn 147 * @aspect Annotations 148 * @declaredat /home/jesper/git/extendj/java5/frontend/Annotations.jrag:370 149 */ 150 @ASTNodeAnnotation.Attribute 151 public boolean hasValue(String annot) { 152 boolean hasValue_String_value = false; 153 154 return hasValue_String_value; 155 } 156 /** 157 * @attribute syn 158 * @aspect Annotations 159 * @declaredat /home/jesper/git/extendj/java5/frontend/Annotations.jrag:558 160 */ 161 @ASTNodeAnnotation.Attribute 162 public boolean commensurateWithTypeDecl(TypeDecl type) { 163 boolean commensurateWithTypeDecl_TypeDecl_value = false; 164 165 return commensurateWithTypeDecl_TypeDecl_value; 166 } 167 /** 168 * @attribute syn 169 * @aspect Annotations 170 * @declaredat /home/jesper/git/extendj/java5/frontend/Annotations.jrag:583 171 */ 172 @ASTNodeAnnotation.Attribute 173 public boolean commensurateWithArrayDecl(ArrayDecl type) { 174 boolean commensurateWithArrayDecl_ArrayDecl_value = type.componentType().commensurateWith(this); 175 176 return commensurateWithArrayDecl_ArrayDecl_value; 177 } 178 /** 179 * @attribute syn 180 * @aspect Annotations 181 * @declaredat /home/jesper/git/extendj/java5/frontend/Annotations.jrag:607 182 */ 183 @ASTNodeAnnotation.Attribute 184 public TypeDecl type() { 185 TypeDecl type_value = unknownType(); 186 187 return type_value; 188 } 189 /** 190 * @attribute inh 191 * @aspect Annotations 192 * @declaredat /home/jesper/git/extendj/java5/frontend/Annotations.jrag:544 193 */ 194 /** 195 * @attribute inh 196 * @aspect Annotations 197 * @declaredat /home/jesper/git/extendj/java5/frontend/Annotations.jrag:544 198 */ 199 @ASTNodeAnnotation.Attribute 200 public TypeDecl enclosingAnnotationDecl() { 201 TypeDecl enclosingAnnotationDecl_value = getParent().Define_enclosingAnnotationDecl(this, null); 202 203 return enclosingAnnotationDecl_value; 204 } 205 /** 206 * @attribute inh 207 * @aspect Annotations 208 * @declaredat /home/jesper/git/extendj/java5/frontend/Annotations.jrag:601 209 */ 210 /** 211 * @attribute inh 212 * @aspect Annotations 213 * @declaredat /home/jesper/git/extendj/java5/frontend/Annotations.jrag:601 214 */ 215 @ASTNodeAnnotation.Attribute 216 public TypeDecl declType() { 217 TypeDecl declType_value = getParent().Define_declType(this, null); 218 219 return declType_value; 220 } 221 /** 222 * @attribute inh 223 * @aspect Annotations 224 * @declaredat /home/jesper/git/extendj/java5/frontend/Annotations.jrag:612 225 */ 226 /** 227 * @attribute inh 228 * @aspect Annotations 229 * @declaredat /home/jesper/git/extendj/java5/frontend/Annotations.jrag:612 230 */ 231 @ASTNodeAnnotation.Attribute 232 public TypeDecl unknownType() { 233 TypeDecl unknownType_value = getParent().Define_unknownType(this, null); 234 235 return unknownType_value; 236 } 237 /** 238 * @attribute inh 239 * @aspect AnnotationsCodegen 240 * @declaredat /home/jesper/git/extendj/java5/backend/AnnotationsCodegen.jrag:292 241 */ 242 /** 243 * @attribute inh 244 * @aspect AnnotationsCodegen 245 * @declaredat /home/jesper/git/extendj/java5/backend/AnnotationsCodegen.jrag:292 246 */ 247 @ASTNodeAnnotation.Attribute 248 public TypeDecl hostType() { 249 TypeDecl hostType_value = getParent().Define_hostType(this, null); 250 251 return hostType_value; 252 } 253 /** 254 * @apilevel internal 255 */ 256 public ASTNode rewriteTo() { 257 return super.rewriteTo(); 258 } 259 }