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 LongType : {@link IntegralType}; 015 * @ast node 016 * @declaredat /home/jesper/svn/JastAddJ/Java1.4Frontend/java.ast:59 017 */ 018 public class LongType extends IntegralType 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 LongType clone() throws CloneNotSupportedException { 034 LongType node = (LongType)super.clone(); 035 node.typeDescriptor_computed = false; 036 node.typeDescriptor_value = null; 037 node.jvmName_computed = false; 038 node.jvmName_value = null; 039 node.boxed_computed = false; 040 node.boxed_value = null; 041 node.in$Circle(false); 042 node.is$Final(false); 043 return node; 044 } 045 /** 046 * @apilevel internal 047 */ 048 @SuppressWarnings({"unchecked", "cast"}) 049 public LongType copy() { 050 051 try { 052 LongType node = (LongType) clone(); 053 node.parent = null; 054 if(children != null) 055 node.children = (ASTNode[]) children.clone(); 056 057 return node; 058 } catch (CloneNotSupportedException e) { 059 throw new Error("Error: clone not supported for " + getClass().getName()); 060 } 061 062 }/** 063 * Create a deep copy of the AST subtree at this node. 064 * The copy is dangling, i.e. has no parent. 065 * @return dangling copy of the subtree at this node 066 * @apilevel low-level 067 */ 068 @SuppressWarnings({"unchecked", "cast"}) 069 public LongType fullCopy() { 070 071 LongType tree = (LongType) copy(); 072 if (children != null) { 073 for (int i = 0; i < children.length; ++i) { 074 075 ASTNode child = (ASTNode) children[i]; 076 if(child != null) { 077 child = child.fullCopy(); 078 tree.setChild(child, i); 079 } 080 } 081 } 082 return tree; 083 084 } /** 085 * @ast method 086 * @aspect PrettyPrint 087 * @declaredat /home/jesper/svn/JastAddJ/Java1.4Frontend/PrettyPrint.jadd:844 088 */ 089 public void toString(StringBuffer s) { 090 s.append("long"); 091 } 092 /** 093 * @ast method 094 * @aspect Attributes 095 * @declaredat /home/jesper/svn/JastAddJ/Java1.4Backend/Attributes.jrag:64 096 */ 097 public int addConstant(ConstantPool p, Constant c) { return p.addConstant(c.longValue()); } 098 /** 099 * @ast method 100 * @aspect CodeGeneration 101 * @declaredat /home/jesper/svn/JastAddJ/Java1.4Backend/CodeGeneration.jrag:544 102 */ 103 public void emitPushConstant(CodeGeneration gen, int value) { LongLiteral.push(gen, value); } 104 /** 105 * @ast method 106 * @aspect CodeGeneration 107 * @declaredat /home/jesper/svn/JastAddJ/Java1.4Backend/CodeGeneration.jrag:615 108 */ 109 public void emitReturn(CodeGeneration gen) { gen.emit(Bytecode.LRETURN);} 110 /** 111 * @ast method 112 * @aspect CodeGeneration 113 * @declaredat /home/jesper/svn/JastAddJ/Java1.4Backend/CodeGeneration.jrag:644 114 */ 115 public void emitLoadLocal(CodeGeneration gen, int pos) { 116 gen.maxLocals = Math.max(gen.maxLocals, pos+2); 117 if(pos == 0) gen.emit(Bytecode.LLOAD_0); 118 else if(pos == 1) gen.emit(Bytecode.LLOAD_1); 119 else if(pos == 2) gen.emit(Bytecode.LLOAD_2); 120 else if(pos == 3) gen.emit(Bytecode.LLOAD_3); 121 else if(pos < 256) gen.emit(Bytecode.LLOAD).add(pos); 122 else gen.emit(Bytecode.WIDE).emit(Bytecode.LLOAD).add2(pos); 123 } 124 /** 125 * @ast method 126 * @aspect CodeGeneration 127 * @declaredat /home/jesper/svn/JastAddJ/Java1.4Backend/CodeGeneration.jrag:757 128 */ 129 public void emitStoreLocal(CodeGeneration gen, int pos) { 130 gen.maxLocals = Math.max(gen.maxLocals, pos+2); 131 if(pos == 0) gen.emit(Bytecode.LSTORE_0); 132 else if(pos == 1) gen.emit(Bytecode.LSTORE_1); 133 else if(pos == 2) gen.emit(Bytecode.LSTORE_2); 134 else if(pos == 3) gen.emit(Bytecode.LSTORE_3); 135 else if(pos < 256) gen.emit(Bytecode.LSTORE).add(pos); 136 else gen.emit(Bytecode.WIDE).emit(Bytecode.LSTORE).add2(pos); 137 } 138 /** 139 * @ast method 140 * @aspect CodeGeneration 141 * @declaredat /home/jesper/svn/JastAddJ/Java1.4Backend/CodeGeneration.jrag:847 142 */ 143 public void emitDup(CodeGeneration gen) { gen.emit(Bytecode.DUP2); } 144 /** 145 * @ast method 146 * @aspect CodeGeneration 147 * @declaredat /home/jesper/svn/JastAddJ/Java1.4Backend/CodeGeneration.jrag:852 148 */ 149 public void emitDup_x1(CodeGeneration gen) { gen.emit(Bytecode.DUP2_X1); } 150 /** 151 * @ast method 152 * @aspect CodeGeneration 153 * @declaredat /home/jesper/svn/JastAddJ/Java1.4Backend/CodeGeneration.jrag:857 154 */ 155 public void emitDup_x2(CodeGeneration gen) { gen.emit(Bytecode.DUP2_X2); } 156 /** 157 * @ast method 158 * @aspect CodeGeneration 159 * @declaredat /home/jesper/svn/JastAddJ/Java1.4Backend/CodeGeneration.jrag:862 160 */ 161 public void emitPop(CodeGeneration gen) { gen.emit(Bytecode.POP2); } 162 /** 163 * @ast method 164 * @aspect CodeGenerationConversions 165 * @declaredat /home/jesper/svn/JastAddJ/Java1.4Backend/CodeGeneration.jrag:946 166 */ 167 void emitCastTo(CodeGeneration gen, TypeDecl type) { type.longToThis(gen); } 168 /** 169 * @ast method 170 * @aspect CodeGenerationConversions 171 * @declaredat /home/jesper/svn/JastAddJ/Java1.4Backend/CodeGeneration.jrag:955 172 */ 173 void intToThis(CodeGeneration gen) { gen.emit(Bytecode.I2L); } 174 /** 175 * @ast method 176 * @aspect CodeGenerationConversions 177 * @declaredat /home/jesper/svn/JastAddJ/Java1.4Backend/CodeGeneration.jrag:968 178 */ 179 void floatToThis(CodeGeneration gen) { gen.emit(Bytecode.F2L); } 180 /** 181 * @ast method 182 * @aspect CodeGenerationConversions 183 * @declaredat /home/jesper/svn/JastAddJ/Java1.4Backend/CodeGeneration.jrag:977 184 */ 185 void doubleToThis(CodeGeneration gen) { gen.emit(Bytecode.D2L); } 186 /** 187 * @ast method 188 * @aspect CodeGenerationConversions 189 * @declaredat /home/jesper/svn/JastAddJ/Java1.4Backend/CodeGeneration.jrag:986 190 */ 191 void longToThis(CodeGeneration gen) { } 192 /** 193 * @ast method 194 * @aspect CodeGenerationConversions 195 * @declaredat /home/jesper/svn/JastAddJ/Java1.4Backend/CodeGeneration.jrag:993 196 */ 197 void byteToThis(CodeGeneration gen) { gen.emit(Bytecode.I2L); } 198 /** 199 * @ast method 200 * @aspect CodeGenerationConversions 201 * @declaredat /home/jesper/svn/JastAddJ/Java1.4Backend/CodeGeneration.jrag:1001 202 */ 203 void charToThis(CodeGeneration gen) { gen.emit(Bytecode.I2L); } 204 /** 205 * @ast method 206 * @aspect CodeGenerationConversions 207 * @declaredat /home/jesper/svn/JastAddJ/Java1.4Backend/CodeGeneration.jrag:1009 208 */ 209 void shortToThis(CodeGeneration gen) { gen.emit(Bytecode.I2L); } 210 /** 211 * @ast method 212 * @aspect CodeGenerationBinaryOperations 213 * @declaredat /home/jesper/svn/JastAddJ/Java1.4Backend/CodeGeneration.jrag:1039 214 */ 215 void neg(CodeGeneration gen) { gen.emit(Bytecode.LNEG); } 216 /** 217 * @ast method 218 * @aspect CodeGenerationBinaryOperations 219 * @declaredat /home/jesper/svn/JastAddJ/Java1.4Backend/CodeGeneration.jrag:1045 220 */ 221 void bitNot(CodeGeneration gen) { emitPushConstant(gen, -1); gen.emit(Bytecode.LXOR); } 222 /** 223 * @ast method 224 * @aspect CodeGenerationBinaryOperations 225 * @declaredat /home/jesper/svn/JastAddJ/Java1.4Backend/CodeGeneration.jrag:1051 226 */ 227 void add(CodeGeneration gen) {gen.emit(Bytecode.LADD);} 228 /** 229 * @ast method 230 * @aspect CodeGenerationBinaryOperations 231 * @declaredat /home/jesper/svn/JastAddJ/Java1.4Backend/CodeGeneration.jrag:1057 232 */ 233 void sub(CodeGeneration gen) {gen.emit(Bytecode.LSUB);} 234 /** 235 * @ast method 236 * @aspect CodeGenerationBinaryOperations 237 * @declaredat /home/jesper/svn/JastAddJ/Java1.4Backend/CodeGeneration.jrag:1063 238 */ 239 void mul(CodeGeneration gen) {gen.emit(Bytecode.LMUL);} 240 /** 241 * @ast method 242 * @aspect CodeGenerationBinaryOperations 243 * @declaredat /home/jesper/svn/JastAddJ/Java1.4Backend/CodeGeneration.jrag:1069 244 */ 245 void div(CodeGeneration gen) {gen.emit(Bytecode.LDIV);} 246 /** 247 * @ast method 248 * @aspect CodeGenerationBinaryOperations 249 * @declaredat /home/jesper/svn/JastAddJ/Java1.4Backend/CodeGeneration.jrag:1075 250 */ 251 void rem(CodeGeneration gen) {gen.emit(Bytecode.LREM);} 252 /** 253 * @ast method 254 * @aspect CodeGenerationBinaryOperations 255 * @declaredat /home/jesper/svn/JastAddJ/Java1.4Backend/CodeGeneration.jrag:1081 256 */ 257 void shl(CodeGeneration gen) {gen.emit(Bytecode.LSHL);} 258 /** 259 * @ast method 260 * @aspect CodeGenerationBinaryOperations 261 * @declaredat /home/jesper/svn/JastAddJ/Java1.4Backend/CodeGeneration.jrag:1085 262 */ 263 void shr(CodeGeneration gen) {gen.emit(Bytecode.LSHR);} 264 /** 265 * @ast method 266 * @aspect CodeGenerationBinaryOperations 267 * @declaredat /home/jesper/svn/JastAddJ/Java1.4Backend/CodeGeneration.jrag:1089 268 */ 269 void ushr(CodeGeneration gen) {gen.emit(Bytecode.LUSHR);} 270 /** 271 * @ast method 272 * @aspect CodeGenerationBinaryOperations 273 * @declaredat /home/jesper/svn/JastAddJ/Java1.4Backend/CodeGeneration.jrag:1093 274 */ 275 void bitand(CodeGeneration gen) {gen.emit(Bytecode.LAND);} 276 /** 277 * @ast method 278 * @aspect CodeGenerationBinaryOperations 279 * @declaredat /home/jesper/svn/JastAddJ/Java1.4Backend/CodeGeneration.jrag:1098 280 */ 281 void bitor(CodeGeneration gen) {gen.emit(Bytecode.LOR);} 282 /** 283 * @ast method 284 * @aspect CodeGenerationBinaryOperations 285 * @declaredat /home/jesper/svn/JastAddJ/Java1.4Backend/CodeGeneration.jrag:1103 286 */ 287 void bitxor(CodeGeneration gen) {gen.emit(Bytecode.LXOR);} 288 /** 289 * @ast method 290 * @aspect CodeGenerationBranch 291 * @declaredat /home/jesper/svn/JastAddJ/Java1.4Backend/CodeGeneration.jrag:1112 292 */ 293 public void branchLT(CodeGeneration gen, int label) { gen.emit(Bytecode.LCMP).emitCompare(Bytecode.IFLT, label); } 294 /** 295 * @ast method 296 * @aspect CodeGenerationBranch 297 * @declaredat /home/jesper/svn/JastAddJ/Java1.4Backend/CodeGeneration.jrag:1118 298 */ 299 public void branchLE(CodeGeneration gen, int label) { gen.emit(Bytecode.LCMP).emitCompare(Bytecode.IFLE, label); } 300 /** 301 * @ast method 302 * @aspect CodeGenerationBranch 303 * @declaredat /home/jesper/svn/JastAddJ/Java1.4Backend/CodeGeneration.jrag:1124 304 */ 305 public void branchGE(CodeGeneration gen, int label) { gen.emit(Bytecode.LCMP).emitCompare(Bytecode.IFGE, label); } 306 /** 307 * @ast method 308 * @aspect CodeGenerationBranch 309 * @declaredat /home/jesper/svn/JastAddJ/Java1.4Backend/CodeGeneration.jrag:1130 310 */ 311 public void branchGT(CodeGeneration gen, int label) { gen.emit(Bytecode.LCMP).emitCompare(Bytecode.IFGT, label); } 312 /** 313 * @ast method 314 * @aspect CodeGenerationBranch 315 * @declaredat /home/jesper/svn/JastAddJ/Java1.4Backend/CodeGeneration.jrag:1136 316 */ 317 public void branchEQ(CodeGeneration gen, int label) { gen.emit(Bytecode.LCMP).emitCompare(Bytecode.IFEQ, label); } 318 /** 319 * @ast method 320 * @aspect CodeGenerationBranch 321 * @declaredat /home/jesper/svn/JastAddJ/Java1.4Backend/CodeGeneration.jrag:1145 322 */ 323 public void branchNE(CodeGeneration gen, int label) { gen.emit(Bytecode.LCMP).emitCompare(Bytecode.IFNE, label); } 324 /** 325 * @ast method 326 * @aspect AnnotationsCodegen 327 * @declaredat /home/jesper/svn/JastAddJ/Java1.5Backend/AnnotationsCodegen.jrag:183 328 */ 329 public int addAnnotConstant(ConstantPool p, Constant c) { 330 return addConstant(p, c); 331 } 332 /** 333 * @ast method 334 * 335 */ 336 public LongType() { 337 super(); 338 339 340 } 341 /** 342 * Initializes the child array to the correct size. 343 * Initializes List and Opt nta children. 344 * @apilevel internal 345 * @ast method 346 * @ast method 347 * 348 */ 349 public void init$Children() { 350 children = new ASTNode[3]; 351 setChild(new Opt(), 1); 352 setChild(new List(), 2); 353 } 354 /** 355 * @ast method 356 * 357 */ 358 public LongType(Modifiers p0, String p1, Opt<Access> p2, List<BodyDecl> p3) { 359 setChild(p0, 0); 360 setID(p1); 361 setChild(p2, 1); 362 setChild(p3, 2); 363 } 364 /** 365 * @ast method 366 * 367 */ 368 public LongType(Modifiers p0, beaver.Symbol p1, Opt<Access> p2, List<BodyDecl> p3) { 369 setChild(p0, 0); 370 setID(p1); 371 setChild(p2, 1); 372 setChild(p3, 2); 373 } 374 /** 375 * @apilevel low-level 376 * @ast method 377 * 378 */ 379 protected int numChildren() { 380 return 3; 381 } 382 /** 383 * @apilevel internal 384 * @ast method 385 * 386 */ 387 public boolean mayHaveRewrite() { 388 return false; 389 } 390 /** 391 * Replaces the Modifiers child. 392 * @param node The new node to replace the Modifiers child. 393 * @apilevel high-level 394 * @ast method 395 * 396 */ 397 public void setModifiers(Modifiers node) { 398 setChild(node, 0); 399 } 400 /** 401 * Retrieves the Modifiers child. 402 * @return The current node used as the Modifiers child. 403 * @apilevel high-level 404 * @ast method 405 * 406 */ 407 public Modifiers getModifiers() { 408 return (Modifiers)getChild(0); 409 } 410 /** 411 * Retrieves the Modifiers child. 412 * <p><em>This method does not invoke AST transformations.</em></p> 413 * @return The current node used as the Modifiers child. 414 * @apilevel low-level 415 * @ast method 416 * 417 */ 418 public Modifiers getModifiersNoTransform() { 419 return (Modifiers)getChildNoTransform(0); 420 } 421 /** 422 * Replaces the lexeme ID. 423 * @param value The new value for the lexeme ID. 424 * @apilevel high-level 425 * @ast method 426 * 427 */ 428 public void setID(String value) { 429 tokenString_ID = value; 430 } 431 /** 432 * JastAdd-internal setter for lexeme ID using the Beaver parser. 433 * @apilevel internal 434 * @ast method 435 * 436 */ 437 public void setID(beaver.Symbol symbol) { 438 if(symbol.value != null && !(symbol.value instanceof String)) 439 throw new UnsupportedOperationException("setID is only valid for String lexemes"); 440 tokenString_ID = (String)symbol.value; 441 IDstart = symbol.getStart(); 442 IDend = symbol.getEnd(); 443 } 444 /** 445 * Retrieves the value for the lexeme ID. 446 * @return The value for the lexeme ID. 447 * @apilevel high-level 448 * @ast method 449 * 450 */ 451 public String getID() { 452 return tokenString_ID != null ? tokenString_ID : ""; 453 } 454 /** 455 * Replaces the optional node for the SuperClassAccess child. This is the {@code Opt} node containing the child SuperClassAccess, not the actual child! 456 * @param opt The new node to be used as the optional node for the SuperClassAccess child. 457 * @apilevel low-level 458 * @ast method 459 * 460 */ 461 public void setSuperClassAccessOpt(Opt<Access> opt) { 462 setChild(opt, 1); 463 } 464 /** 465 * Check whether the optional SuperClassAccess child exists. 466 * @return {@code true} if the optional SuperClassAccess child exists, {@code false} if it does not. 467 * @apilevel high-level 468 * @ast method 469 * 470 */ 471 public boolean hasSuperClassAccess() { 472 return getSuperClassAccessOpt().getNumChild() != 0; 473 } 474 /** 475 * Retrieves the (optional) SuperClassAccess child. 476 * @return The SuperClassAccess child, if it exists. Returns {@code null} otherwise. 477 * @apilevel low-level 478 * @ast method 479 * 480 */ 481 @SuppressWarnings({"unchecked", "cast"}) 482 public Access getSuperClassAccess() { 483 return (Access)getSuperClassAccessOpt().getChild(0); 484 } 485 /** 486 * Replaces the (optional) SuperClassAccess child. 487 * @param node The new node to be used as the SuperClassAccess child. 488 * @apilevel high-level 489 * @ast method 490 * 491 */ 492 public void setSuperClassAccess(Access node) { 493 getSuperClassAccessOpt().setChild(node, 0); 494 } 495 /** 496 * @apilevel low-level 497 * @ast method 498 * 499 */ 500 @SuppressWarnings({"unchecked", "cast"}) 501 public Opt<Access> getSuperClassAccessOpt() { 502 return (Opt<Access>)getChild(1); 503 } 504 /** 505 * Retrieves the optional node for child SuperClassAccess. This is the {@code Opt} node containing the child SuperClassAccess, not the actual child! 506 * <p><em>This method does not invoke AST transformations.</em></p> 507 * @return The optional node for child SuperClassAccess. 508 * @apilevel low-level 509 * @ast method 510 * 511 */ 512 @SuppressWarnings({"unchecked", "cast"}) 513 public Opt<Access> getSuperClassAccessOptNoTransform() { 514 return (Opt<Access>)getChildNoTransform(1); 515 } 516 /** 517 * Replaces the BodyDecl list. 518 * @param list The new list node to be used as the BodyDecl list. 519 * @apilevel high-level 520 * @ast method 521 * 522 */ 523 public void setBodyDeclList(List<BodyDecl> list) { 524 setChild(list, 2); 525 } 526 /** 527 * Retrieves the number of children in the BodyDecl list. 528 * @return Number of children in the BodyDecl list. 529 * @apilevel high-level 530 * @ast method 531 * 532 */ 533 public int getNumBodyDecl() { 534 return getBodyDeclList().getNumChild(); 535 } 536 /** 537 * Retrieves the number of children in the BodyDecl list. 538 * Calling this method will not trigger rewrites.. 539 * @return Number of children in the BodyDecl list. 540 * @apilevel low-level 541 * @ast method 542 * 543 */ 544 public int getNumBodyDeclNoTransform() { 545 return getBodyDeclListNoTransform().getNumChildNoTransform(); 546 } 547 /** 548 * Retrieves the element at index {@code i} in the BodyDecl list.. 549 * @param i Index of the element to return. 550 * @return The element at position {@code i} in the BodyDecl list. 551 * @apilevel high-level 552 * @ast method 553 * 554 */ 555 @SuppressWarnings({"unchecked", "cast"}) 556 public BodyDecl getBodyDecl(int i) { 557 return (BodyDecl)getBodyDeclList().getChild(i); 558 } 559 /** 560 * Append an element to the BodyDecl list. 561 * @param node The element to append to the BodyDecl list. 562 * @apilevel high-level 563 * @ast method 564 * 565 */ 566 public void addBodyDecl(BodyDecl node) { 567 List<BodyDecl> list = (parent == null || state == null) ? getBodyDeclListNoTransform() : getBodyDeclList(); 568 list.addChild(node); 569 } 570 /** 571 * @apilevel low-level 572 * @ast method 573 * 574 */ 575 public void addBodyDeclNoTransform(BodyDecl node) { 576 List<BodyDecl> list = getBodyDeclListNoTransform(); 577 list.addChild(node); 578 } 579 /** 580 * Replaces the BodyDecl list element at index {@code i} with the new node {@code node}. 581 * @param node The new node to replace the old list element. 582 * @param i The list index of the node to be replaced. 583 * @apilevel high-level 584 * @ast method 585 * 586 */ 587 public void setBodyDecl(BodyDecl node, int i) { 588 List<BodyDecl> list = getBodyDeclList(); 589 list.setChild(node, i); 590 } 591 /** 592 * Retrieves the BodyDecl list. 593 * @return The node representing the BodyDecl list. 594 * @apilevel high-level 595 * @ast method 596 * 597 */ 598 public List<BodyDecl> getBodyDecls() { 599 return getBodyDeclList(); 600 } 601 /** 602 * Retrieves the BodyDecl list. 603 * <p><em>This method does not invoke AST transformations.</em></p> 604 * @return The node representing the BodyDecl list. 605 * @apilevel low-level 606 * @ast method 607 * 608 */ 609 public List<BodyDecl> getBodyDeclsNoTransform() { 610 return getBodyDeclListNoTransform(); 611 } 612 /** 613 * Retrieves the BodyDecl list. 614 * @return The node representing the BodyDecl list. 615 * @apilevel high-level 616 * @ast method 617 * 618 */ 619 @SuppressWarnings({"unchecked", "cast"}) 620 public List<BodyDecl> getBodyDeclList() { 621 List<BodyDecl> list = (List<BodyDecl>)getChild(2); 622 list.getNumChild(); 623 return list; 624 } 625 /** 626 * Retrieves the BodyDecl list. 627 * <p><em>This method does not invoke AST transformations.</em></p> 628 * @return The node representing the BodyDecl list. 629 * @apilevel low-level 630 * @ast method 631 * 632 */ 633 @SuppressWarnings({"unchecked", "cast"}) 634 public List<BodyDecl> getBodyDeclListNoTransform() { 635 return (List<BodyDecl>)getChildNoTransform(2); 636 } 637 /** 638 * @attribute syn 639 * @aspect ConstantExpression 640 * @declaredat /home/jesper/svn/JastAddJ/Java7Frontend/ConstantExpression.jrag:160 641 */ 642 public Constant cast(Constant c) { 643 ASTNode$State state = state(); 644 try { return Constant.create(c.longValue()); } 645 finally { 646 } 647 } 648 /** 649 * @attribute syn 650 * @aspect ConstantExpression 651 * @declaredat /home/jesper/svn/JastAddJ/Java7Frontend/ConstantExpression.jrag:174 652 */ 653 public Constant plus(Constant c) { 654 ASTNode$State state = state(); 655 try { return c; } 656 finally { 657 } 658 } 659 /** 660 * @attribute syn 661 * @aspect ConstantExpression 662 * @declaredat /home/jesper/svn/JastAddJ/Java7Frontend/ConstantExpression.jrag:183 663 */ 664 public Constant minus(Constant c) { 665 ASTNode$State state = state(); 666 try { return Constant.create(-c.longValue()); } 667 finally { 668 } 669 } 670 /** 671 * @attribute syn 672 * @aspect ConstantExpression 673 * @declaredat /home/jesper/svn/JastAddJ/Java7Frontend/ConstantExpression.jrag:192 674 */ 675 public Constant bitNot(Constant c) { 676 ASTNode$State state = state(); 677 try { return Constant.create(~c.longValue()); } 678 finally { 679 } 680 } 681 /** 682 * @attribute syn 683 * @aspect ConstantExpression 684 * @declaredat /home/jesper/svn/JastAddJ/Java7Frontend/ConstantExpression.jrag:199 685 */ 686 public Constant mul(Constant c1, Constant c2) { 687 ASTNode$State state = state(); 688 try { return Constant.create(c1.longValue() * c2.longValue()); } 689 finally { 690 } 691 } 692 /** 693 * @attribute syn 694 * @aspect ConstantExpression 695 * @declaredat /home/jesper/svn/JastAddJ/Java7Frontend/ConstantExpression.jrag:208 696 */ 697 public Constant div(Constant c1, Constant c2) { 698 ASTNode$State state = state(); 699 try { return Constant.create(c1.longValue() / c2.longValue()); } 700 finally { 701 } 702 } 703 /** 704 * @attribute syn 705 * @aspect ConstantExpression 706 * @declaredat /home/jesper/svn/JastAddJ/Java7Frontend/ConstantExpression.jrag:217 707 */ 708 public Constant mod(Constant c1, Constant c2) { 709 ASTNode$State state = state(); 710 try { return Constant.create(c1.longValue() % c2.longValue()); } 711 finally { 712 } 713 } 714 /** 715 * @attribute syn 716 * @aspect ConstantExpression 717 * @declaredat /home/jesper/svn/JastAddJ/Java7Frontend/ConstantExpression.jrag:226 718 */ 719 public Constant add(Constant c1, Constant c2) { 720 ASTNode$State state = state(); 721 try { return Constant.create(c1.longValue() + c2.longValue()); } 722 finally { 723 } 724 } 725 /** 726 * @attribute syn 727 * @aspect ConstantExpression 728 * @declaredat /home/jesper/svn/JastAddJ/Java7Frontend/ConstantExpression.jrag:236 729 */ 730 public Constant sub(Constant c1, Constant c2) { 731 ASTNode$State state = state(); 732 try { return Constant.create(c1.longValue() - c2.longValue()); } 733 finally { 734 } 735 } 736 /** 737 * @attribute syn 738 * @aspect ConstantExpression 739 * @declaredat /home/jesper/svn/JastAddJ/Java7Frontend/ConstantExpression.jrag:245 740 */ 741 public Constant lshift(Constant c1, Constant c2) { 742 ASTNode$State state = state(); 743 try { return Constant.create(c1.longValue() << c2.longValue()); } 744 finally { 745 } 746 } 747 /** 748 * @attribute syn 749 * @aspect ConstantExpression 750 * @declaredat /home/jesper/svn/JastAddJ/Java7Frontend/ConstantExpression.jrag:252 751 */ 752 public Constant rshift(Constant c1, Constant c2) { 753 ASTNode$State state = state(); 754 try { return Constant.create(c1.longValue() >> c2.longValue()); } 755 finally { 756 } 757 } 758 /** 759 * @attribute syn 760 * @aspect ConstantExpression 761 * @declaredat /home/jesper/svn/JastAddJ/Java7Frontend/ConstantExpression.jrag:259 762 */ 763 public Constant urshift(Constant c1, Constant c2) { 764 ASTNode$State state = state(); 765 try { return Constant.create(c1.longValue() >>> c2.longValue()); } 766 finally { 767 } 768 } 769 /** 770 * @attribute syn 771 * @aspect ConstantExpression 772 * @declaredat /home/jesper/svn/JastAddJ/Java7Frontend/ConstantExpression.jrag:266 773 */ 774 public Constant andBitwise(Constant c1, Constant c2) { 775 ASTNode$State state = state(); 776 try { return Constant.create(c1.longValue() & c2.longValue()); } 777 finally { 778 } 779 } 780 /** 781 * @attribute syn 782 * @aspect ConstantExpression 783 * @declaredat /home/jesper/svn/JastAddJ/Java7Frontend/ConstantExpression.jrag:274 784 */ 785 public Constant xorBitwise(Constant c1, Constant c2) { 786 ASTNode$State state = state(); 787 try { return Constant.create(c1.longValue() ^ c2.longValue()); } 788 finally { 789 } 790 } 791 /** 792 * @attribute syn 793 * @aspect ConstantExpression 794 * @declaredat /home/jesper/svn/JastAddJ/Java7Frontend/ConstantExpression.jrag:282 795 */ 796 public Constant orBitwise(Constant c1, Constant c2) { 797 ASTNode$State state = state(); 798 try { return Constant.create(c1.longValue() | c2.longValue()); } 799 finally { 800 } 801 } 802 /** 803 * @attribute syn 804 * @aspect ConstantExpression 805 * @declaredat /home/jesper/svn/JastAddJ/Java7Frontend/ConstantExpression.jrag:290 806 */ 807 public Constant questionColon(Constant cond, Constant c1, Constant c2) { 808 ASTNode$State state = state(); 809 try { return Constant.create(cond.booleanValue() ? c1.longValue() : c2.longValue()); } 810 finally { 811 } 812 } 813 /** 814 * @attribute syn 815 * @aspect ConstantExpression 816 * @declaredat /home/jesper/svn/JastAddJ/Java7Frontend/ConstantExpression.jrag:394 817 */ 818 public boolean eqIsTrue(Expr left, Expr right) { 819 ASTNode$State state = state(); 820 try { return left.constant().longValue() == right.constant().longValue(); } 821 finally { 822 } 823 } 824 /** 825 * @attribute syn 826 * @aspect ConstantExpression 827 * @declaredat /home/jesper/svn/JastAddJ/Java7Frontend/ConstantExpression.jrag:405 828 */ 829 public boolean ltIsTrue(Expr left, Expr right) { 830 ASTNode$State state = state(); 831 try { return left.constant().longValue() < right.constant().longValue(); } 832 finally { 833 } 834 } 835 /** 836 * @attribute syn 837 * @aspect ConstantExpression 838 * @declaredat /home/jesper/svn/JastAddJ/Java7Frontend/ConstantExpression.jrag:411 839 */ 840 public boolean leIsTrue(Expr left, Expr right) { 841 ASTNode$State state = state(); 842 try { return left.constant().longValue() <= right.constant().longValue(); } 843 finally { 844 } 845 } 846 /** 847 * @attribute syn 848 * @aspect NameCheck 849 * @declaredat /home/jesper/svn/JastAddJ/Java1.4Frontend/NameCheck.jrag:427 850 */ 851 public boolean assignableToInt() { 852 ASTNode$State state = state(); 853 try { return false; } 854 finally { 855 } 856 } 857 /** 858 * @attribute syn 859 * @aspect TypeAnalysis 860 * @declaredat /home/jesper/svn/JastAddJ/Java1.4Frontend/TypeAnalysis.jrag:197 861 */ 862 public boolean isLong() { 863 ASTNode$State state = state(); 864 try { return true; } 865 finally { 866 } 867 } 868 /** 869 * @attribute syn 870 * @aspect CodeGeneration 871 * @declaredat /home/jesper/svn/JastAddJ/Java1.4Backend/CodeGeneration.jrag:621 872 */ 873 public byte arrayLoad() { 874 ASTNode$State state = state(); 875 try { return Bytecode.LALOAD; } 876 finally { 877 } 878 } 879 /** 880 * @attribute syn 881 * @aspect CodeGeneration 882 * @declaredat /home/jesper/svn/JastAddJ/Java1.4Backend/CodeGeneration.jrag:723 883 */ 884 public byte arrayStore() { 885 ASTNode$State state = state(); 886 try { return Bytecode.LASTORE; } 887 finally { 888 } 889 } 890 /** 891 * @apilevel internal 892 */ 893 protected boolean typeDescriptor_computed = false; 894 /** 895 * @apilevel internal 896 */ 897 protected String typeDescriptor_value; 898 /** 899 * @attribute syn 900 * @aspect ConstantPoolNames 901 * @declaredat /home/jesper/svn/JastAddJ/Java1.4Backend/ConstantPoolNames.jrag:21 902 */ 903 @SuppressWarnings({"unchecked", "cast"}) 904 public String typeDescriptor() { 905 if(typeDescriptor_computed) { 906 return typeDescriptor_value; 907 } 908 ASTNode$State state = state(); 909 int num = state.boundariesCrossed; 910 boolean isFinal = this.is$Final(); 911 typeDescriptor_value = typeDescriptor_compute(); 912 if(isFinal && num == state().boundariesCrossed){ typeDescriptor_computed = true; } 913 return typeDescriptor_value; 914 } 915 /** 916 * @apilevel internal 917 */ 918 private String typeDescriptor_compute() { return "J"; } 919 /** 920 * @attribute syn 921 * @aspect CreateBCode 922 * @declaredat /home/jesper/svn/JastAddJ/Java1.4Backend/CreateBCode.jrag:825 923 */ 924 public int arrayPrimitiveTypeDescriptor() { 925 ASTNode$State state = state(); 926 try { return 11; } 927 finally { 928 } 929 } 930 /** 931 * @apilevel internal 932 */ 933 protected boolean jvmName_computed = false; 934 /** 935 * @apilevel internal 936 */ 937 protected String jvmName_value; 938 /** 939 * @attribute syn 940 * @aspect Java2Rewrites 941 * @declaredat /home/jesper/svn/JastAddJ/Java1.4Backend/Java2Rewrites.jrag:39 942 */ 943 @SuppressWarnings({"unchecked", "cast"}) 944 public String jvmName() { 945 if(jvmName_computed) { 946 return jvmName_value; 947 } 948 ASTNode$State state = state(); 949 int num = state.boundariesCrossed; 950 boolean isFinal = this.is$Final(); 951 jvmName_value = jvmName_compute(); 952 if(isFinal && num == state().boundariesCrossed){ jvmName_computed = true; } 953 return jvmName_value; 954 } 955 /** 956 * @apilevel internal 957 */ 958 private String jvmName_compute() { return "J"; } 959 /** 960 * @attribute syn 961 * @aspect Java2Rewrites 962 * @declaredat /home/jesper/svn/JastAddJ/Java1.4Backend/Java2Rewrites.jrag:44 963 */ 964 public String primitiveClassName() { 965 ASTNode$State state = state(); 966 try { return "Long"; } 967 finally { 968 } 969 } 970 /** 971 * @attribute syn 972 * @aspect LocalNum 973 * @declaredat /home/jesper/svn/JastAddJ/Java1.4Backend/LocalNum.jrag:124 974 */ 975 public int variableSize() { 976 ASTNode$State state = state(); 977 try { return 2; } 978 finally { 979 } 980 } 981 /** 982 * @apilevel internal 983 */ 984 protected boolean boxed_computed = false; 985 /** 986 * @apilevel internal 987 */ 988 protected TypeDecl boxed_value; 989 /** 990 * @attribute syn 991 * @aspect AutoBoxing 992 * @declaredat /home/jesper/svn/JastAddJ/Java1.5Frontend/AutoBoxing.jrag:41 993 */ 994 @SuppressWarnings({"unchecked", "cast"}) 995 public TypeDecl boxed() { 996 if(boxed_computed) { 997 return boxed_value; 998 } 999 ASTNode$State state = state(); 1000 int num = state.boundariesCrossed; 1001 boolean isFinal = this.is$Final(); 1002 boxed_value = boxed_compute(); 1003 if(isFinal && num == state().boundariesCrossed){ boxed_computed = true; } 1004 return boxed_value; 1005 } 1006 /** 1007 * @apilevel internal 1008 */ 1009 private TypeDecl boxed_compute() { return lookupType("java.lang", "Long"); } 1010 /** 1011 * @apilevel internal 1012 */ 1013 public ASTNode rewriteTo() { 1014 return super.rewriteTo(); 1015 } 1016 }