1 package polyglot.ext.jl.ast; 2 3 import polyglot.ast.*; 4 import polyglot.ast.Assert; 5 import polyglot.types.Flags; 6 import polyglot.types.Package; 7 import polyglot.types.Type; 8 import polyglot.types.Qualifier; 9 import polyglot.util.*; 10 import java.util.*; 11 12 17 public abstract class AbstractNodeFactory_c implements NodeFactory 18 { 19 public Disamb disamb() { 20 return new Disamb_c(); 21 } 22 23 public final AmbPrefix AmbPrefix(Position pos, String name) { 24 return AmbPrefix(pos, null, name); 25 } 26 27 public final AmbReceiver AmbReceiver(Position pos, String name) { 28 return AmbReceiver(pos, null, name); 29 } 30 31 public final AmbQualifierNode AmbQualifierNode(Position pos, String name) { 32 return AmbQualifierNode(pos, null, name); 33 } 34 35 public final AmbTypeNode AmbTypeNode(Position pos, String name) { 36 return AmbTypeNode(pos, null, name); 37 } 38 39 public final ArrayInit ArrayInit(Position pos) { 40 return ArrayInit(pos, Collections.EMPTY_LIST); 41 } 42 43 public final Assert Assert(Position pos, Expr cond) { 44 return Assert(pos, cond, null); 45 } 46 47 public final Block Block(Position pos) { 48 return Block(pos, Collections.EMPTY_LIST); 49 } 50 51 public final Block Block(Position pos, Stmt s1) { 52 List l = new ArrayList(1); 53 l.add(s1); 54 return Block(pos, l); 55 } 56 57 public final Block Block(Position pos, Stmt s1, Stmt s2) { 58 List l = new ArrayList(2); 59 l.add(s1); 60 l.add(s2); 61 return Block(pos, l); 62 } 63 64 public final Block Block(Position pos, Stmt s1, Stmt s2, Stmt s3) { 65 List l = new ArrayList(3); 66 l.add(s1); 67 l.add(s2); 68 l.add(s3); 69 return Block(pos, l); 70 } 71 72 public final Block Block(Position pos, Stmt s1, Stmt s2, Stmt s3, Stmt s4) { 73 List l = new ArrayList(4); 74 l.add(s1); 75 l.add(s2); 76 l.add(s3); 77 l.add(s4); 78 return Block(pos, l); 79 } 80 81 public final Branch Break(Position pos) { 82 return Branch(pos, Branch.BREAK, null); 83 } 84 85 public final Branch Break(Position pos, String label) { 86 return Branch(pos, Branch.BREAK, label); 87 } 88 89 public final Branch Continue(Position pos) { 90 return Branch(pos, Branch.CONTINUE, null); 91 } 92 93 public final Branch Continue(Position pos, String label) { 94 return Branch(pos, Branch.CONTINUE, label); 95 } 96 97 public final Branch Branch(Position pos, Branch.Kind kind) { 98 return Branch(pos, kind, null); 99 } 100 101 public final Call Call(Position pos, String name) { 102 return Call(pos, null, name, Collections.EMPTY_LIST); 103 } 104 105 public final Call Call(Position pos, String name, Expr a1) { 106 List l = new ArrayList(1); 107 l.add(a1); 108 return Call(pos, null, name, l); 109 } 110 111 public final Call Call(Position pos, String name, Expr a1, Expr a2) { 112 List l = new ArrayList(2); 113 l.add(a1); 114 l.add(a2); 115 return Call(pos, null, name, l); 116 } 117 118 public final Call Call(Position pos, String name, Expr a1, Expr a2, Expr a3) { 119 List l = new ArrayList(3); 120 l.add(a1); 121 l.add(a2); 122 l.add(a3); 123 return Call(pos, null, name, l); 124 } 125 126 public final Call Call(Position pos, String name, Expr a1, Expr a2, Expr a3, Expr a4) { 127 List l = new ArrayList(4); 128 l.add(a1); 129 l.add(a2); 130 l.add(a3); 131 l.add(a4); 132 return Call(pos, null, name, l); 133 } 134 135 public final Call Call(Position pos, String name, List args) { 136 return Call(pos, null, name, args); 137 } 138 139 public final Call Call(Position pos, Receiver target, String name) { 140 return Call(pos, target, name, Collections.EMPTY_LIST); 141 } 142 143 public final Call Call(Position pos, Receiver target, String name, Expr a1) { 144 List l = new ArrayList(1); 145 l.add(a1); 146 return Call(pos, target, name, l); 147 } 148 149 public final Call Call(Position pos, Receiver target, String name, Expr a1, Expr a2) { 150 List l = new ArrayList(2); 151 l.add(a1); 152 l.add(a2); 153 return Call(pos, target, name, l); 154 } 155 156 public final Call Call(Position pos, Receiver target, String name, Expr a1, Expr a2, Expr a3) { 157 List l = new ArrayList(3); 158 l.add(a1); 159 l.add(a2); 160 l.add(a3); 161 return Call(pos, target, name, l); 162 } 163 164 public final Call Call(Position pos, Receiver target, String name, Expr a1, Expr a2, Expr a3, Expr a4) { 165 List l = new ArrayList(4); 166 l.add(a1); 167 l.add(a2); 168 l.add(a3); 169 l.add(a4); 170 return Call(pos, target, name, l); 171 } 172 173 public final Case Default(Position pos) { 174 return Case(pos, null); 175 } 176 177 public final ConstructorCall ThisCall(Position pos, List args) { 178 return ConstructorCall(pos, ConstructorCall.THIS, null, args); 179 } 180 181 public final ConstructorCall ThisCall(Position pos, Expr outer, List args) { 182 return ConstructorCall(pos, ConstructorCall.THIS, outer, args); 183 } 184 185 public final ConstructorCall SuperCall(Position pos, List args) { 186 return ConstructorCall(pos, ConstructorCall.SUPER, null, args); 187 } 188 189 public final ConstructorCall SuperCall(Position pos, Expr outer, List args) { 190 return ConstructorCall(pos, ConstructorCall.SUPER, outer, args); 191 } 192 193 public final ConstructorCall ConstructorCall(Position pos, ConstructorCall.Kind kind, List args) { 194 return ConstructorCall(pos, kind, null, args); 195 } 196 197 public final FieldDecl FieldDecl(Position pos, Flags flags, TypeNode type, String name) { 198 return FieldDecl(pos, flags, type, name, null); 199 } 200 201 public final Field Field(Position pos, String name) { 202 return Field(pos, null, name); 203 } 204 205 public final If If(Position pos, Expr cond, Stmt consequent) { 206 return If(pos, cond, consequent, null); 207 } 208 209 public final LocalDecl LocalDecl(Position pos, Flags flags, TypeNode type, String name) { 210 return LocalDecl(pos, flags, type, name, null); 211 } 212 213 public final New New(Position pos, TypeNode type, List args) { 214 return New(pos, null, type, args, null); 215 } 216 217 public final New New(Position pos, TypeNode type, List args, ClassBody body) { 218 return New(pos, null, type, args, body); 219 } 220 221 public final New New(Position pos, Expr outer, TypeNode objectType, List args) { 222 return New(pos, outer, objectType, args, null); 223 } 224 225 public final NewArray NewArray(Position pos, TypeNode base, List dims) { 226 return NewArray(pos, base, dims, 0, null); 227 } 228 229 public final NewArray NewArray(Position pos, TypeNode base, List dims, int addDims) { 230 return NewArray(pos, base, dims, addDims, null); 231 } 232 233 public final NewArray NewArray(Position pos, TypeNode base, int addDims, ArrayInit init) { 234 return NewArray(pos, base, Collections.EMPTY_LIST, addDims, init); 235 } 236 237 public final Return Return(Position pos) { 238 return Return(pos, null); 239 } 240 241 public final SourceFile SourceFile(Position pos, List decls) { 242 return SourceFile(pos, null, Collections.EMPTY_LIST, decls); 243 } 244 245 public final SourceFile SourceFile(Position pos, List imports, List decls) { 246 return SourceFile(pos, null, imports, decls); 247 } 248 249 public final Special This(Position pos) { 250 return Special(pos, Special.THIS, null); 251 } 252 253 public final Special This(Position pos, TypeNode outer) { 254 return Special(pos, Special.THIS, outer); 255 } 256 257 public final Special Super(Position pos) { 258 return Special(pos, Special.SUPER, null); 259 } 260 261 public final Special Super(Position pos, TypeNode outer) { 262 return Special(pos, Special.SUPER, outer); 263 } 264 265 public final Special Special(Position pos, Special.Kind kind) { 266 return Special(pos, kind, null); 267 } 268 269 public final Try Try(Position pos, Block tryBlock, List catchBlocks) { 270 return Try(pos, tryBlock, catchBlocks, null); 271 } 272 273 public final Unary Unary(Position pos, Expr expr, Unary.Operator op) { 274 return Unary(pos, op, expr); 275 } 276 } 277 | Popular Tags |