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/java4/grammar/Java.ast:74
027     * @production MemberDecl : {@link BodyDecl};
028    
029     */
030    public abstract class MemberDecl extends BodyDecl implements Cloneable {
031      /**
032       * @aspect Modifiers
033       * @declaredat /home/jesper/git/extendj/java4/frontend/Modifiers.jrag:232
034       */
035      public void checkModifiers() {
036        if (!isSynthetic()) {
037          super.checkModifiers();
038          if (isStatic() && hostType().isInnerClass() && !isConstant()) {
039            error("*** Inner classes may not declare static members, unless they are compile-time constant fields");
040          }
041        }
042      }
043      /**
044       * @declaredat ASTNode:1
045       */
046      public MemberDecl() {
047        super();
048      }
049      /**
050       * Initializes the child array to the correct size.
051       * Initializes List and Opt nta children.
052       * @apilevel internal
053       * @ast method
054       * @declaredat ASTNode:10
055       */
056      public void init$Children() {
057      }
058      /**
059       * @apilevel low-level
060       * @declaredat ASTNode:15
061       */
062      protected int numChildren() {
063        return 0;
064      }
065      /**
066       * @apilevel internal
067       * @declaredat ASTNode:21
068       */
069      public boolean mayHaveRewrite() {
070        return false;
071      }
072      /**
073       * @apilevel internal
074       * @declaredat ASTNode:27
075       */
076      public void flushAttrCache() {
077        super.flushAttrCache();
078      }
079      /**
080       * @apilevel internal
081       * @declaredat ASTNode:33
082       */
083      public void flushCollectionCache() {
084        super.flushCollectionCache();
085      }
086      /**
087       * @apilevel internal
088       * @declaredat ASTNode:39
089       */
090      public void flushRewriteCache() {
091        super.flushRewriteCache();
092      }
093      /**
094       * @apilevel internal
095       * @declaredat ASTNode:45
096       */
097      public MemberDecl clone() throws CloneNotSupportedException {
098        MemberDecl node = (MemberDecl) super.clone();
099        return node;
100      }
101      /**
102       * Create a deep copy of the AST subtree at this node.
103       * The copy is dangling, i.e. has no parent.
104       * @return dangling copy of the subtree at this node
105       * @apilevel low-level
106       * @deprecated Please use treeCopy or treeCopyNoTransform instead
107       * @declaredat ASTNode:56
108       */
109      @Deprecated
110      public abstract MemberDecl fullCopy();
111      /**
112       * Create a deep copy of the AST subtree at this node.
113       * The copy is dangling, i.e. has no parent.
114       * @return dangling copy of the subtree at this node
115       * @apilevel low-level
116       * @declaredat ASTNode:64
117       */
118      public abstract MemberDecl treeCopyNoTransform();
119      /**
120       * Create a deep copy of the AST subtree at this node.
121       * The subtree of this node is traversed to trigger rewrites before copy.
122       * The copy is dangling, i.e. has no parent.
123       * @return dangling copy of the subtree at this node
124       * @apilevel low-level
125       * @declaredat ASTNode:72
126       */
127      public abstract MemberDecl treeCopy();
128      /**
129       * @attribute syn
130       * @aspect Modifiers
131       * @declaredat /home/jesper/git/extendj/java4/frontend/Modifiers.jrag:263
132       */
133      @ASTNodeAnnotation.Attribute
134      public abstract boolean isStatic();
135      /**
136       * @attribute syn
137       * @aspect ConstantExpression
138       * @declaredat /home/jesper/git/extendj/java4/frontend/ConstantExpression.jrag:250
139       */
140      @ASTNodeAnnotation.Attribute
141      public boolean isConstant() {
142        boolean isConstant_value = false;
143    
144        return isConstant_value;
145      }
146      /**
147       * @attribute syn
148       * @aspect Modifiers
149       * @declaredat /home/jesper/git/extendj/java4/frontend/Modifiers.jrag:255
150       */
151      @ASTNodeAnnotation.Attribute
152      public boolean isSynthetic() {
153        boolean isSynthetic_value = false;
154    
155        return isSynthetic_value;
156      }
157      /**
158       * @apilevel internal
159       */
160      public ASTNode rewriteTo() {
161        return super.rewriteTo();
162      }
163    }