Examples of typeID()


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

    // a label valued to nil means: by default we fall through the case...
    // both nil means we leave the value on the stack

    Constant cst = this.optimizedBooleanConstant();
    generateCode(currentScope, codeStream, valueRequired && cst == Constant.NotAConstant);
    if ((cst != Constant.NotAConstant) && (cst.typeID() == TypeIds.T_boolean)) {
      int pc = codeStream.position;
      if (cst.booleanValue() == true) {
        // constant == true
        if (valueRequired) {
          if (falseLabel == null) {
View Full Code Here

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

  if (currentFieldInfo.hasConstant() != otherFieldInfo.hasConstant())
    return true;
  if (currentFieldInfo.hasConstant()) {
    Constant currentConstant = currentFieldInfo.getConstant();
    Constant otherConstant = otherFieldInfo.getConstant();
    if (currentConstant.typeID() != otherConstant.typeID())
      return true;
    if (!currentConstant.getClass().equals(otherConstant.getClass()))
      return true;
    switch (currentConstant.typeID()) {
      case TypeIds.T_int :
View Full Code Here

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

    if (internalObject == null)
      return null;

    if (internalObject instanceof Constant) {
      Constant constant = (Constant) internalObject;
      switch (constant.typeID()) {
        case TypeIds.T_boolean:
          return Boolean.valueOf(constant.booleanValue());
        case TypeIds.T_byte:
          return new Byte(constant.byteValue());
        case TypeIds.T_char:
View Full Code Here

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

    org.aspectj.org.eclipse.jdt.internal.compiler.ast.ASTNode node = (org.aspectj.org.eclipse.jdt.internal.compiler.ast.ASTNode) this.newAstToOldAst.get(expression);
    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());
View Full Code Here

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

      contents[contentsOffset++] = 0;
      contents[contentsOffset++] = 0;
      contents[contentsOffset++] = 2;
      attributesNumber++;
      // Need to add the constant_value_index
      switch (fieldConstant.typeID()) {
        case T_boolean :
          int booleanValueIndex =
            constantPool.literalIndex(fieldConstant.booleanValue() ? 1 : 0);
          contents[contentsOffset++] = (byte) (booleanValueIndex >> 8);
          contents[contentsOffset++] = (byte) booleanValueIndex;
View Full Code Here

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

          ArrayInitializer initializer = (ArrayInitializer) value;
          Expression[] inits = initializer.expressions;
          if (inits != null) {
            for (int j = 0, initsLength = inits.length; j < initsLength; j++) {
              Constant cst = inits[j].constant;
              if (cst != Constant.NotAConstant && cst.typeID() == T_JavaLangString) {
                long irritant = CompilerOptions.warningTokenToIrritant(cst.stringValue());
                if (irritant != 0) {
                  suppressWarningIrritants |= irritant;
                  if (~suppressWarningIrritants == 0) break pairLoop;
                } else {
View Full Code Here

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

              }
            }
          }
        } else {
          Constant cst = value.constant;
          if (cst != Constant.NotAConstant && cst.typeID() == T_JavaLangString) {
            long irritant = CompilerOptions.warningTokenToIrritant(cst.stringValue());
            if (irritant != 0) {
              suppressWarningIrritants |= irritant;
              if (~suppressWarningIrritants == 0) break pairLoop;
            } else {
View Full Code Here

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

          }
          codeStream.store(localBinding, false);
          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);
View Full Code Here

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

          codeStream.store(localBinding, false);
          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) {
View Full Code Here

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

   * @since 3.0
   */
  public Object getConstantValue() {
    Constant c = this.binding.constant();
    if (c == null || c == Constant.NotAConstant) return null;
    switch (c.typeID()) {
      case TypeIds.T_boolean:
        return Boolean.valueOf(c.booleanValue());
      case TypeIds.T_byte:
        return new Byte(c.byteValue());
      case TypeIds.T_char:
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.