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:107
027     * @production AssignMultiplicativeExpr : {@link AssignExpr};
028    
029     */
030    public abstract class AssignMultiplicativeExpr extends AssignExpr implements Cloneable {
031      /**
032       * @aspect TypeCheck
033       * @declaredat /home/jesper/git/extendj/java4/frontend/TypeCheck.jrag:91
034       */
035      public void typeCheck() {
036        if (getSource().type().isBoolean() || getDest().type().isBoolean()) {
037          error("Multiplicative operators do not operate on boolean types");
038        }
039        super.typeCheck();
040      }
041      /**
042       * @declaredat ASTNode:1
043       */
044      public AssignMultiplicativeExpr() {
045        super();
046      }
047      /**
048       * Initializes the child array to the correct size.
049       * Initializes List and Opt nta children.
050       * @apilevel internal
051       * @ast method
052       * @declaredat ASTNode:10
053       */
054      public void init$Children() {
055        children = new ASTNode[2];
056      }
057      /**
058       * @declaredat ASTNode:13
059       */
060      public AssignMultiplicativeExpr(Expr p0, Expr p1) {
061        setChild(p0, 0);
062        setChild(p1, 1);
063      }
064      /**
065       * @apilevel low-level
066       * @declaredat ASTNode:20
067       */
068      protected int numChildren() {
069        return 2;
070      }
071      /**
072       * @apilevel internal
073       * @declaredat ASTNode:26
074       */
075      public boolean mayHaveRewrite() {
076        return false;
077      }
078      /**
079       * @apilevel internal
080       * @declaredat ASTNode:32
081       */
082      public void flushAttrCache() {
083        super.flushAttrCache();
084      }
085      /**
086       * @apilevel internal
087       * @declaredat ASTNode:38
088       */
089      public void flushCollectionCache() {
090        super.flushCollectionCache();
091      }
092      /**
093       * @apilevel internal
094       * @declaredat ASTNode:44
095       */
096      public void flushRewriteCache() {
097        super.flushRewriteCache();
098      }
099      /**
100       * @apilevel internal
101       * @declaredat ASTNode:50
102       */
103      public AssignMultiplicativeExpr clone() throws CloneNotSupportedException {
104        AssignMultiplicativeExpr node = (AssignMultiplicativeExpr) super.clone();
105        return node;
106      }
107      /**
108       * Create a deep copy of the AST subtree at this node.
109       * The copy is dangling, i.e. has no parent.
110       * @return dangling copy of the subtree at this node
111       * @apilevel low-level
112       * @deprecated Please use treeCopy or treeCopyNoTransform instead
113       * @declaredat ASTNode:61
114       */
115      @Deprecated
116      public abstract AssignMultiplicativeExpr fullCopy();
117      /**
118       * Create a deep copy of the AST subtree at this node.
119       * The copy is dangling, i.e. has no parent.
120       * @return dangling copy of the subtree at this node
121       * @apilevel low-level
122       * @declaredat ASTNode:69
123       */
124      public abstract AssignMultiplicativeExpr treeCopyNoTransform();
125      /**
126       * Create a deep copy of the AST subtree at this node.
127       * The subtree of this node is traversed to trigger rewrites before copy.
128       * The copy is dangling, i.e. has no parent.
129       * @return dangling copy of the subtree at this node
130       * @apilevel low-level
131       * @declaredat ASTNode:77
132       */
133      public abstract AssignMultiplicativeExpr treeCopy();
134      /**
135       * Replaces the Dest child.
136       * @param node The new node to replace the Dest child.
137       * @apilevel high-level
138       */
139      public void setDest(Expr node) {
140        setChild(node, 0);
141      }
142      /**
143       * Retrieves the Dest child.
144       * @return The current node used as the Dest child.
145       * @apilevel high-level
146       */
147      @ASTNodeAnnotation.Child(name="Dest")
148      public Expr getDest() {
149        return (Expr) getChild(0);
150      }
151      /**
152       * Retrieves the Dest child.
153       * <p><em>This method does not invoke AST transformations.</em></p>
154       * @return The current node used as the Dest child.
155       * @apilevel low-level
156       */
157      public Expr getDestNoTransform() {
158        return (Expr) getChildNoTransform(0);
159      }
160      /**
161       * Replaces the Source child.
162       * @param node The new node to replace the Source child.
163       * @apilevel high-level
164       */
165      public void setSource(Expr node) {
166        setChild(node, 1);
167      }
168      /**
169       * Retrieves the Source child.
170       * @return The current node used as the Source child.
171       * @apilevel high-level
172       */
173      @ASTNodeAnnotation.Child(name="Source")
174      public Expr getSource() {
175        return (Expr) getChild(1);
176      }
177      /**
178       * Retrieves the Source child.
179       * <p><em>This method does not invoke AST transformations.</em></p>
180       * @return The current node used as the Source child.
181       * @apilevel low-level
182       */
183      public Expr getSourceNoTransform() {
184        return (Expr) getChildNoTransform(1);
185      }
186      /**
187       * @apilevel internal
188       */
189      public ASTNode rewriteTo() {
190        return super.rewriteTo();
191      }
192    }