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 AssignOrExpr : {@link AssignBitwiseExpr}; 015 * @ast node 016 * @declaredat /home/jesper/svn/JastAddJ/Java1.4Frontend/java.ast:127 017 */ 018 public class AssignOrExpr extends AssignBitwiseExpr 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 AssignOrExpr clone() throws CloneNotSupportedException { 034 AssignOrExpr node = (AssignOrExpr)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 AssignOrExpr copy() { 044 045 try { 046 AssignOrExpr node = (AssignOrExpr) 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 AssignOrExpr fullCopy() { 064 065 AssignOrExpr tree = (AssignOrExpr) 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:432 082 */ 083 public void createAssignOp(CodeGeneration gen, TypeDecl type) { type.bitor(gen); } 084 /** 085 * @ast method 086 * 087 */ 088 public AssignOrExpr() { 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[2]; 103 } 104 /** 105 * @ast method 106 * 107 */ 108 public AssignOrExpr(Expr p0, Expr p1) { 109 setChild(p0, 0); 110 setChild(p1, 1); 111 } 112 /** 113 * @apilevel low-level 114 * @ast method 115 * 116 */ 117 protected int numChildren() { 118 return 2; 119 } 120 /** 121 * @apilevel internal 122 * @ast method 123 * 124 */ 125 public boolean mayHaveRewrite() { 126 return false; 127 } 128 /** 129 * Replaces the Dest child. 130 * @param node The new node to replace the Dest child. 131 * @apilevel high-level 132 * @ast method 133 * 134 */ 135 public void setDest(Expr node) { 136 setChild(node, 0); 137 } 138 /** 139 * Retrieves the Dest child. 140 * @return The current node used as the Dest child. 141 * @apilevel high-level 142 * @ast method 143 * 144 */ 145 public Expr getDest() { 146 return (Expr)getChild(0); 147 } 148 /** 149 * Retrieves the Dest child. 150 * <p><em>This method does not invoke AST transformations.</em></p> 151 * @return The current node used as the Dest child. 152 * @apilevel low-level 153 * @ast method 154 * 155 */ 156 public Expr getDestNoTransform() { 157 return (Expr)getChildNoTransform(0); 158 } 159 /** 160 * Replaces the Source child. 161 * @param node The new node to replace the Source child. 162 * @apilevel high-level 163 * @ast method 164 * 165 */ 166 public void setSource(Expr node) { 167 setChild(node, 1); 168 } 169 /** 170 * Retrieves the Source child. 171 * @return The current node used as the Source child. 172 * @apilevel high-level 173 * @ast method 174 * 175 */ 176 public Expr getSource() { 177 return (Expr)getChild(1); 178 } 179 /** 180 * Retrieves the Source child. 181 * <p><em>This method does not invoke AST transformations.</em></p> 182 * @return The current node used as the Source child. 183 * @apilevel low-level 184 * @ast method 185 * 186 */ 187 public Expr getSourceNoTransform() { 188 return (Expr)getChildNoTransform(1); 189 } 190 /** 191 * @attribute syn 192 * @aspect PrettyPrint 193 * @declaredat /home/jesper/svn/JastAddJ/Java1.4Frontend/PrettyPrint.jadd:247 194 */ 195 public String printOp() { 196 ASTNode$State state = state(); 197 try { return " |= "; } 198 finally { 199 } 200 } 201 /** 202 * @apilevel internal 203 */ 204 public ASTNode rewriteTo() { 205 return super.rewriteTo(); 206 } 207 }