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 AssignLShiftExpr : {@link AssignShiftExpr};
015     * @ast node
016     * @declaredat /home/jesper/svn/JastAddJ/Java1.4Frontend/java.ast:120
017     */
018    public class AssignLShiftExpr extends AssignShiftExpr 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 AssignLShiftExpr clone() throws CloneNotSupportedException {
034        AssignLShiftExpr node = (AssignLShiftExpr)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 AssignLShiftExpr copy() {
044      
045      try {
046        AssignLShiftExpr node = (AssignLShiftExpr) 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 AssignLShiftExpr fullCopy() {
064      
065      AssignLShiftExpr tree = (AssignLShiftExpr) 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       * @aspect CreateBCode
081       * @declaredat /home/jesper/svn/JastAddJ/Java1.4Backend/CreateBCode.jrag:345
082       */
083      public void createBCode(CodeGeneration gen) { emitShiftExpr(gen); }
084      /**
085       * @ast method 
086       * @aspect CreateBCode
087       * @declaredat /home/jesper/svn/JastAddJ/Java1.4Backend/CreateBCode.jrag:427
088       */
089      public void createAssignOp(CodeGeneration gen, TypeDecl type)  { type.shl(gen); }
090      /**
091       * @ast method 
092       * 
093       */
094      public AssignLShiftExpr() {
095        super();
096    
097    
098      }
099      /**
100       * Initializes the child array to the correct size.
101       * Initializes List and Opt nta children.
102       * @apilevel internal
103       * @ast method
104       * @ast method 
105       * 
106       */
107      public void init$Children() {
108        children = new ASTNode[2];
109      }
110      /**
111       * @ast method 
112       * 
113       */
114      public AssignLShiftExpr(Expr p0, Expr p1) {
115        setChild(p0, 0);
116        setChild(p1, 1);
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 Dest child.
136       * @param node The new node to replace the Dest child.
137       * @apilevel high-level
138       * @ast method 
139       * 
140       */
141      public void setDest(Expr node) {
142        setChild(node, 0);
143      }
144      /**
145       * Retrieves the Dest child.
146       * @return The current node used as the Dest child.
147       * @apilevel high-level
148       * @ast method 
149       * 
150       */
151      public Expr getDest() {
152        return (Expr)getChild(0);
153      }
154      /**
155       * Retrieves the Dest child.
156       * <p><em>This method does not invoke AST transformations.</em></p>
157       * @return The current node used as the Dest child.
158       * @apilevel low-level
159       * @ast method 
160       * 
161       */
162      public Expr getDestNoTransform() {
163        return (Expr)getChildNoTransform(0);
164      }
165      /**
166       * Replaces the Source child.
167       * @param node The new node to replace the Source child.
168       * @apilevel high-level
169       * @ast method 
170       * 
171       */
172      public void setSource(Expr node) {
173        setChild(node, 1);
174      }
175      /**
176       * Retrieves the Source child.
177       * @return The current node used as the Source child.
178       * @apilevel high-level
179       * @ast method 
180       * 
181       */
182      public Expr getSource() {
183        return (Expr)getChild(1);
184      }
185      /**
186       * Retrieves the Source child.
187       * <p><em>This method does not invoke AST transformations.</em></p>
188       * @return The current node used as the Source child.
189       * @apilevel low-level
190       * @ast method 
191       * 
192       */
193      public Expr getSourceNoTransform() {
194        return (Expr)getChildNoTransform(1);
195      }
196      /**
197       * @attribute syn
198       * @aspect PrettyPrint
199       * @declaredat /home/jesper/svn/JastAddJ/Java1.4Frontend/PrettyPrint.jadd:247
200       */
201      public String printOp() {
202        ASTNode$State state = state();
203        try {  return " <<= ";  }
204        finally {
205        }
206      }
207      /**
208       * @apilevel internal
209       */
210      public ASTNode rewriteTo() {
211        return super.rewriteTo();
212      }
213    }