Package javassist.compiler.ast

Examples of javassist.compiler.ast.IntConst


/*      */
/*  466 */       return new DoubleConst(((Number)value).doubleValue(), token);
/*      */     }
/*  468 */     if ((value instanceof Number)) {
/*  469 */       int token = (value instanceof Long) ? 403 : 402;
/*  470 */       return new IntConst(((Number)value).longValue(), token);
/*      */     }
/*  472 */     if ((value instanceof Boolean)) {
/*  473 */       return new Keyword(((Boolean)value).booleanValue() ? 410 : 411);
/*      */     }
/*      */
View Full Code Here


/*      */   }
/*      */
/*      */   private boolean isConstant(Expr expr, int op, ASTree oprand) {
/*  598 */     oprand = stripPlusExpr(oprand);
/*  599 */     if ((oprand instanceof IntConst)) {
/*  600 */       IntConst c = (IntConst)oprand;
/*  601 */       long v = c.get();
/*  602 */       if (op == 45)
/*  603 */         v = -v;
/*  604 */       else if (op == 126)
/*  605 */         v ^= -1L;
/*      */       else {
/*  607 */         return false;
/*      */       }
/*  609 */       c.set(v);
/*      */     }
/*  611 */     else if ((oprand instanceof DoubleConst)) {
/*  612 */       DoubleConst c = (DoubleConst)oprand;
/*  613 */       if (op == 45)
/*  614 */         c.set(-c.get());
/*      */       else
/*  616 */         return false;
/*      */     }
/*      */     else {
/*  619 */       return false;
View Full Code Here

/*  868 */         switch (t2) {
/*      */         case 401:
/*      */         case 402:
/*      */         case 403:
/*  872 */           this.lex.get();
/*  873 */           return new IntConst(-this.lex.getLong(), t2);
/*      */         case 404:
/*      */         case 405:
/*  876 */           this.lex.get();
/*  877 */           return new DoubleConst(-this.lex.getDouble(), t2);
/*      */         }
View Full Code Here

/* 1013 */     switch (token) {
/*      */     case 401:
/*      */     case 402:
/*      */     case 403:
/* 1017 */       this.lex.get();
/* 1018 */       return new IntConst(this.lex.getLong(), token);
/*      */     case 404:
/*      */     case 405:
/* 1021 */       this.lex.get();
/* 1022 */       return new DoubleConst(this.lex.getDouble(), token);
/*      */     }
View Full Code Here

TOP

Related Classes of javassist.compiler.ast.IntConst

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.