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

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


      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;
          break;
        case T_byte :
        case T_char :
View Full Code Here


      for (int i = 0, max = initializations.length; i < max; i++) {
        initializations[i].generateCode(scope, codeStream);
      }
    }
    Constant cst = this.condition == null ? null : this.condition.optimizedBooleanConstant();
    boolean isConditionOptimizedFalse = cst != null && (cst != Constant.NotAConstant && cst.booleanValue() == false);
    if (isConditionOptimizedFalse) {
      condition.generateCode(scope, codeStream, false);
      // May loose some local variable initializations : affecting the local variable attributes
      if ((this.bits & ASTNode.NeededScope) != 0) {
        codeStream.exitUserScope(scope);
View Full Code Here

  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:
        return new Character(c.charValue());
      case TypeIds.T_double:
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.