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 PostIncExpr : {@link PostfixExpr};
015     * @ast node
016     * @declaredat /home/jesper/svn/JastAddJ/Java1.4Frontend/java.ast:147
017     */
018    public class PostIncExpr extends PostfixExpr 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 PostIncExpr clone() throws CloneNotSupportedException {
034        PostIncExpr node = (PostIncExpr)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 PostIncExpr copy() {
044      
045      try {
046        PostIncExpr node = (PostIncExpr) 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 PostIncExpr fullCopy() {
064      
065      PostIncExpr tree = (PostIncExpr) 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:861
082       */
083      public void createBCode(CodeGeneration gen) { emitPostfix(gen, 1); }
084      /**
085       * @ast method 
086       * 
087       */
088      public PostIncExpr() {
089        super();
090    
091    
092      }
093      /**
094       * Initializes the child array to the correct size.
095       * Initializes List and Opt nta children.
096       * @apilevel internal
097       * @ast method
098       * @ast method 
099       * 
100       */
101      public void init$Children() {
102        children = new ASTNode[1];
103      }
104      /**
105       * @ast method 
106       * 
107       */
108      public PostIncExpr(Expr p0) {
109        setChild(p0, 0);
110      }
111      /**
112       * @apilevel low-level
113       * @ast method 
114       * 
115       */
116      protected int numChildren() {
117        return 1;
118      }
119      /**
120       * @apilevel internal
121       * @ast method 
122       * 
123       */
124      public boolean mayHaveRewrite() {
125        return false;
126      }
127      /**
128       * Replaces the Operand child.
129       * @param node The new node to replace the Operand child.
130       * @apilevel high-level
131       * @ast method 
132       * 
133       */
134      public void setOperand(Expr node) {
135        setChild(node, 0);
136      }
137      /**
138       * Retrieves the Operand child.
139       * @return The current node used as the Operand child.
140       * @apilevel high-level
141       * @ast method 
142       * 
143       */
144      public Expr getOperand() {
145        return (Expr)getChild(0);
146      }
147      /**
148       * Retrieves the Operand child.
149       * <p><em>This method does not invoke AST transformations.</em></p>
150       * @return The current node used as the Operand child.
151       * @apilevel low-level
152       * @ast method 
153       * 
154       */
155      public Expr getOperandNoTransform() {
156        return (Expr)getChildNoTransform(0);
157      }
158      /**
159       * @attribute syn
160       * @aspect PrettyPrint
161       * @declaredat /home/jesper/svn/JastAddJ/Java1.4Frontend/PrettyPrint.jadd:372
162       */
163      public String printPostOp() {
164        ASTNode$State state = state();
165        try {  return "++";  }
166        finally {
167        }
168      }
169      /**
170       * @attribute syn
171       * @aspect CreateBCode
172       * @declaredat /home/jesper/svn/JastAddJ/Java1.4Backend/CreateBCode.jrag:219
173       */
174      public boolean needsPop() {
175        ASTNode$State state = state();
176        try {  return getOperand().isVarAccessWithAccessor();  }
177        finally {
178        }
179      }
180      /**
181       * @apilevel internal
182       */
183      public ASTNode rewriteTo() {
184        return super.rewriteTo();
185      }
186    }