001    /* This file was generated with JastAdd2 (http://jastadd.org) version R20130213 */
002    package AST;
003    
004    import java.util.HashSet;
005    import java.io.File;
006    import java.util.*;
007    import beaver.*;
008    import java.util.ArrayList;
009    import java.util.zip.*;
010    import java.io.*;
011    import java.io.FileNotFoundException;
012    import java.util.Collection;
013    /**
014     * @production VariableArityParameterDeclarationSubstituted : {@link VariableArityParameterDeclaration} ::= <span class="component">&lt;Original:VariableArityParameterDeclaration&gt;</span>;
015     * @ast node
016     * @declaredat /home/jesper/svn/JastAddJ/Java1.5Frontend/Generics.ast:34
017     */
018    public class VariableArityParameterDeclarationSubstituted extends VariableArityParameterDeclaration implements Cloneable {
019      /**
020       * @apilevel low-level
021       */
022      public void flushCache() {
023      }
024      /**
025       * @apilevel internal
026       */
027      public void flushCollectionCache() {
028      }
029      /**
030       * @apilevel internal
031       */
032      @SuppressWarnings({"unchecked", "cast"})
033      public VariableArityParameterDeclarationSubstituted clone() throws CloneNotSupportedException {
034        VariableArityParameterDeclarationSubstituted node = (VariableArityParameterDeclarationSubstituted)super.clone();
035        node.in$Circle(false);
036        node.is$Final(false);
037        return node;
038      }
039    /**
040     * @apilevel internal
041     */
042      @SuppressWarnings({"unchecked", "cast"})
043    public VariableArityParameterDeclarationSubstituted copy() {
044      
045      try {
046        VariableArityParameterDeclarationSubstituted node = (VariableArityParameterDeclarationSubstituted) clone();
047        node.parent = null;
048        if(children != null)
049          node.children = (ASTNode[]) children.clone();
050        
051        return node;
052      } catch (CloneNotSupportedException e) {
053        throw new Error("Error: clone not supported for " + getClass().getName());
054      }
055      
056    }/**
057     * Create a deep copy of the AST subtree at this node.
058     * The copy is dangling, i.e. has no parent.
059     * @return dangling copy of the subtree at this node
060     * @apilevel low-level
061     */
062      @SuppressWarnings({"unchecked", "cast"})
063    public VariableArityParameterDeclarationSubstituted fullCopy() {
064      
065      VariableArityParameterDeclarationSubstituted tree = (VariableArityParameterDeclarationSubstituted) copy();
066      if (children != null) {
067        for (int i = 0; i < children.length; ++i) {
068          
069          ASTNode child = (ASTNode) children[i];
070          if(child != null) {
071            child = child.fullCopy();
072            tree.setChild(child, i);
073          }
074        }
075      }
076      return tree;
077      
078    }  /**
079       * @ast method 
080       * 
081       */
082      public VariableArityParameterDeclarationSubstituted() {
083        super();
084    
085    
086      }
087      /**
088       * Initializes the child array to the correct size.
089       * Initializes List and Opt nta children.
090       * @apilevel internal
091       * @ast method
092       * @ast method 
093       * 
094       */
095      public void init$Children() {
096        children = new ASTNode[2];
097      }
098      /**
099       * @ast method 
100       * 
101       */
102      public VariableArityParameterDeclarationSubstituted(Modifiers p0, Access p1, String p2, VariableArityParameterDeclaration p3) {
103        setChild(p0, 0);
104        setChild(p1, 1);
105        setID(p2);
106        setOriginal(p3);
107      }
108      /**
109       * @ast method 
110       * 
111       */
112      public VariableArityParameterDeclarationSubstituted(Modifiers p0, Access p1, beaver.Symbol p2, VariableArityParameterDeclaration p3) {
113        setChild(p0, 0);
114        setChild(p1, 1);
115        setID(p2);
116        setOriginal(p3);
117      }
118      /**
119       * @apilevel low-level
120       * @ast method 
121       * 
122       */
123      protected int numChildren() {
124        return 2;
125      }
126      /**
127       * @apilevel internal
128       * @ast method 
129       * 
130       */
131      public boolean mayHaveRewrite() {
132        return false;
133      }
134      /**
135       * Replaces the Modifiers child.
136       * @param node The new node to replace the Modifiers child.
137       * @apilevel high-level
138       * @ast method 
139       * 
140       */
141      public void setModifiers(Modifiers node) {
142        setChild(node, 0);
143      }
144      /**
145       * Retrieves the Modifiers child.
146       * @return The current node used as the Modifiers child.
147       * @apilevel high-level
148       * @ast method 
149       * 
150       */
151      public Modifiers getModifiers() {
152        return (Modifiers)getChild(0);
153      }
154      /**
155       * Retrieves the Modifiers child.
156       * <p><em>This method does not invoke AST transformations.</em></p>
157       * @return The current node used as the Modifiers child.
158       * @apilevel low-level
159       * @ast method 
160       * 
161       */
162      public Modifiers getModifiersNoTransform() {
163        return (Modifiers)getChildNoTransform(0);
164      }
165      /**
166       * Replaces the TypeAccess child.
167       * @param node The new node to replace the TypeAccess child.
168       * @apilevel high-level
169       * @ast method 
170       * 
171       */
172      public void setTypeAccess(Access node) {
173        setChild(node, 1);
174      }
175      /**
176       * Retrieves the TypeAccess child.
177       * @return The current node used as the TypeAccess child.
178       * @apilevel high-level
179       * @ast method 
180       * 
181       */
182      public Access getTypeAccess() {
183        return (Access)getChild(1);
184      }
185      /**
186       * Retrieves the TypeAccess child.
187       * <p><em>This method does not invoke AST transformations.</em></p>
188       * @return The current node used as the TypeAccess child.
189       * @apilevel low-level
190       * @ast method 
191       * 
192       */
193      public Access getTypeAccessNoTransform() {
194        return (Access)getChildNoTransform(1);
195      }
196      /**
197       * Replaces the lexeme ID.
198       * @param value The new value for the lexeme ID.
199       * @apilevel high-level
200       * @ast method 
201       * 
202       */
203      public void setID(String value) {
204        tokenString_ID = value;
205      }
206      /**
207       * JastAdd-internal setter for lexeme ID using the Beaver parser.
208       * @apilevel internal
209       * @ast method 
210       * 
211       */
212      public void setID(beaver.Symbol symbol) {
213        if(symbol.value != null && !(symbol.value instanceof String))
214          throw new UnsupportedOperationException("setID is only valid for String lexemes");
215        tokenString_ID = (String)symbol.value;
216        IDstart = symbol.getStart();
217        IDend = symbol.getEnd();
218      }
219      /**
220       * Retrieves the value for the lexeme ID.
221       * @return The value for the lexeme ID.
222       * @apilevel high-level
223       * @ast method 
224       * 
225       */
226      public String getID() {
227        return tokenString_ID != null ? tokenString_ID : "";
228      }
229      /**
230       * Replaces the lexeme Original.
231       * @param value The new value for the lexeme Original.
232       * @apilevel high-level
233       * @ast method 
234       * 
235       */
236      public void setOriginal(VariableArityParameterDeclaration value) {
237        tokenVariableArityParameterDeclaration_Original = value;
238      }
239      /**
240       * @apilevel internal
241       * @ast method 
242       * 
243       */
244      
245      /**
246       * @apilevel internal
247       */
248      protected VariableArityParameterDeclaration tokenVariableArityParameterDeclaration_Original;
249      /**
250       * Retrieves the value for the lexeme Original.
251       * @return The value for the lexeme Original.
252       * @apilevel high-level
253       * @ast method 
254       * 
255       */
256      public VariableArityParameterDeclaration getOriginal() {
257        return tokenVariableArityParameterDeclaration_Original;
258      }
259      /**
260       * @apilevel internal
261       */
262      public ASTNode rewriteTo() {
263        return super.rewriteTo();
264      }
265    }