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 AssignBitwiseExpr : {@link AssignExpr}; 015 * @ast node 016 * @declaredat /home/jesper/svn/JastAddJ/Java1.4Frontend/java.ast:124 017 */ 018 public abstract class AssignBitwiseExpr extends AssignExpr 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 AssignBitwiseExpr clone() throws CloneNotSupportedException { 034 AssignBitwiseExpr node = (AssignBitwiseExpr)super.clone(); 035 node.in$Circle(false); 036 node.is$Final(false); 037 return node; 038 } 039 /** 040 * @ast method 041 * @aspect TypeCheck 042 * @declaredat /home/jesper/svn/JastAddJ/Java1.4Frontend/TypeCheck.jrag:98 043 */ 044 public void typeCheck() { 045 TypeDecl source = sourceType(); 046 TypeDecl dest = getDest().type(); 047 if(source.isIntegralType() && dest.isIntegralType()) 048 super.typeCheck(); 049 else if(source.isBoolean() && dest.isBoolean()) 050 super.typeCheck(); 051 else 052 error("Operator only operates on integral and boolean types"); 053 } 054 /** 055 * @ast method 056 * 057 */ 058 public AssignBitwiseExpr() { 059 super(); 060 061 062 } 063 /** 064 * Initializes the child array to the correct size. 065 * Initializes List and Opt nta children. 066 * @apilevel internal 067 * @ast method 068 * @ast method 069 * 070 */ 071 public void init$Children() { 072 children = new ASTNode[2]; 073 } 074 /** 075 * @ast method 076 * 077 */ 078 public AssignBitwiseExpr(Expr p0, Expr p1) { 079 setChild(p0, 0); 080 setChild(p1, 1); 081 } 082 /** 083 * @apilevel low-level 084 * @ast method 085 * 086 */ 087 protected int numChildren() { 088 return 2; 089 } 090 /** 091 * @apilevel internal 092 * @ast method 093 * 094 */ 095 public boolean mayHaveRewrite() { 096 return false; 097 } 098 /** 099 * Replaces the Dest child. 100 * @param node The new node to replace the Dest child. 101 * @apilevel high-level 102 * @ast method 103 * 104 */ 105 public void setDest(Expr node) { 106 setChild(node, 0); 107 } 108 /** 109 * Retrieves the Dest child. 110 * @return The current node used as the Dest child. 111 * @apilevel high-level 112 * @ast method 113 * 114 */ 115 public Expr getDest() { 116 return (Expr)getChild(0); 117 } 118 /** 119 * Retrieves the Dest child. 120 * <p><em>This method does not invoke AST transformations.</em></p> 121 * @return The current node used as the Dest child. 122 * @apilevel low-level 123 * @ast method 124 * 125 */ 126 public Expr getDestNoTransform() { 127 return (Expr)getChildNoTransform(0); 128 } 129 /** 130 * Replaces the Source child. 131 * @param node The new node to replace the Source child. 132 * @apilevel high-level 133 * @ast method 134 * 135 */ 136 public void setSource(Expr node) { 137 setChild(node, 1); 138 } 139 /** 140 * Retrieves the Source child. 141 * @return The current node used as the Source child. 142 * @apilevel high-level 143 * @ast method 144 * 145 */ 146 public Expr getSource() { 147 return (Expr)getChild(1); 148 } 149 /** 150 * Retrieves the Source child. 151 * <p><em>This method does not invoke AST transformations.</em></p> 152 * @return The current node used as the Source child. 153 * @apilevel low-level 154 * @ast method 155 * 156 */ 157 public Expr getSourceNoTransform() { 158 return (Expr)getChildNoTransform(1); 159 } 160 /** 161 * @apilevel internal 162 */ 163 public ASTNode rewriteTo() { 164 return super.rewriteTo(); 165 } 166 }