Package org.aspectj.org.eclipse.jdt.internal.compiler.impl

Examples of org.aspectj.org.eclipse.jdt.internal.compiler.impl.Constant.intValue()


      return true;
    if (!currentConstant.getClass().equals(otherConstant.getClass()))
      return true;
    switch (currentConstant.typeID()) {
      case TypeIds.T_int :
        return currentConstant.intValue() != otherConstant.intValue();
      case TypeIds.T_byte :
        return currentConstant.byteValue() != otherConstant.byteValue();
      case TypeIds.T_short :
        return currentConstant.shortValue() != otherConstant.shortValue();
      case TypeIds.T_char :
View Full Code Here


    final int numberOfParens = (intLiteral.bits & ASTNode.ParenthesizedMASK) >> ASTNode.ParenthesizedSHIFT;
    if (numberOfParens > 0) {
      manageOpeningParenthesizedExpression(intLiteral, numberOfParens);
    }
    Constant constant = intLiteral.constant;
    if (constant != null && constant.intValue() < 0) {
      this.scribe.printNextToken(TerminalTokens.TokenNameMINUS);     
    }
    this.scribe.printNextToken(TerminalTokens.TokenNameIntegerLiteral);

    if (numberOfParens > 0) {
View Full Code Here

        case TypeIds.T_double:
          return new Double(constant.doubleValue());
        case TypeIds.T_float:
          return new Float(constant.floatValue());
        case TypeIds.T_int:
          return new Integer(constant.intValue());
        case TypeIds.T_long:
          return new Long(constant.longValue());
        case TypeIds.T_short:
          return new Short(constant.shortValue());
        case TypeIds.T_JavaLangString:
View Full Code Here

    if (node != null && (node instanceof org.aspectj.org.eclipse.jdt.internal.compiler.ast.Expression)) {
      org.aspectj.org.eclipse.jdt.internal.compiler.ast.Expression compilerExpression = (org.aspectj.org.eclipse.jdt.internal.compiler.ast.Expression) node;
      Constant constant = compilerExpression.constant;
      if (constant != null && constant != Constant.NotAConstant) {
        switch (constant.typeID()) {
          case TypeIds.T_int : return new Integer(constant.intValue());
          case TypeIds.T_byte : return new Byte(constant.byteValue());
          case TypeIds.T_short : return new Short(constant.shortValue());
          case TypeIds.T_char : return new Character(constant.charValue());
          case TypeIds.T_float : return new Float(constant.floatValue());
          case TypeIds.T_double : return new Double(constant.doubleValue());
View Full Code Here

        int counter = 0;
        for (int i = 0; i < length; i++) {
          Constant constant;
          final Statement statement = statements[i];
          if ((constant = statement.resolveCase(scope, expressionType, this)) != Constant.NotAConstant) {
            int key = constant.intValue();
            //----check for duplicate case statement------------
            for (int j = 0; j < counter; j++) {
              if (this.constants[j] == key) {
                final CaseStatement currentCaseStatement = (CaseStatement) statement;
                if (duplicateCaseStatements == null) {
View Full Code Here

        case T_byte :
        case T_char :
        case T_int :
        case T_short :
          int integerValueIndex =
            constantPool.literalIndex(fieldConstant.intValue());
          contents[contentsOffset++] = (byte) (integerValueIndex >> 8);
          contents[contentsOffset++] = (byte) integerValueIndex;
          break;
        case T_float :
          int floatValueIndex =
View Full Code Here

          return;
        case T_int :
          if (((assignConstant = expression.constant) != Constant.NotAConstant)
            && (assignConstant.typeID() != T_float) // only for integral types
            && (assignConstant.typeID() != T_double)   
            && ((increment = assignConstant.intValue()) == (short) increment)) { // 16 bits value
            switch (operator) {
              case PLUS :
                codeStream.iinc(localBinding.resolvedPosition, increment);
                if (valueRequired) {
                  codeStream.load(localBinding);
View Full Code Here

      case TypeIds.T_double:
        return new Double(c.doubleValue());
      case TypeIds.T_float:
        return new Float(c.floatValue());
      case TypeIds.T_int:
        return new Integer(c.intValue());
      case TypeIds.T_long:
        return new Long(c.longValue());
      case TypeIds.T_short:
        return new Short(c.shortValue());
      case TypeIds.T_JavaLangString:
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. 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.