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

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


      case TypeIds.T_float :
        return currentConstant.floatValue() != otherConstant.floatValue();
      case TypeIds.T_double :
        return currentConstant.doubleValue() != otherConstant.doubleValue();
      case TypeIds.T_boolean :
        return currentConstant.booleanValue() != otherConstant.booleanValue();
      case TypeIds.T_JavaLangString :
        return !currentConstant.stringValue().equals(otherConstant.stringValue());
    }
  }
  return false;
View Full Code Here


          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());
          case TypeIds.T_boolean : return constant.booleanValue() ? Boolean.TRUE : Boolean.FALSE;
          case TypeIds.T_long : return new Long(constant.longValue());
          case TypeIds.T_JavaLangString : return constant.stringValue();
        }
        return null;
      }
View Full Code Here

  Constant cst = 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) {
          // implicit falling through the FALSE case
          if (trueLabel != null) {
View Full Code Here

      if (this.receiver.resolvedType != null
          && this.receiver.resolvedType.id == TypeIds.T_OrgEclipseCoreRuntimeAssert
          && argument.resolvedType != null
          && argument.resolvedType.id == TypeIds.T_boolean) {
        Constant cst = argument.optimizedBooleanConstant();
        boolean isOptimizedTrueAssertion = cst != Constant.NotAConstant && cst.booleanValue() == true;
        boolean isOptimizedFalseAssertion = cst != Constant.NotAConstant && cst.booleanValue() == false;
        flowContext.tagBits |= FlowContext.HIDE_NULL_COMPARISON_WARNING;
        conditionFlowInfo = argument.analyseCode(currentScope, flowContext, flowInfo.copy());
        if (!wasInsideAssert) {
          flowContext.tagBits &= ~FlowContext.HIDE_NULL_COMPARISON_WARNING;
View Full Code Here

          && this.receiver.resolvedType.id == TypeIds.T_OrgEclipseCoreRuntimeAssert
          && argument.resolvedType != null
          && argument.resolvedType.id == TypeIds.T_boolean) {
        Constant cst = argument.optimizedBooleanConstant();
        boolean isOptimizedTrueAssertion = cst != Constant.NotAConstant && cst.booleanValue() == true;
        boolean isOptimizedFalseAssertion = cst != Constant.NotAConstant && cst.booleanValue() == false;
        flowContext.tagBits |= FlowContext.HIDE_NULL_COMPARISON_WARNING;
        conditionFlowInfo = argument.analyseCode(currentScope, flowContext, flowInfo.copy());
        if (!wasInsideAssert) {
          flowContext.tagBits &= ~FlowContext.HIDE_NULL_COMPARISON_WARNING;
        }
View Full Code Here

  Constant cst = this.assertExpression.optimizedBooleanConstant();
  if ((this.assertExpression.implicitConversion & TypeIds.UNBOXING) != 0) {
    this.assertExpression.checkNPE(currentScope, flowContext, flowInfo);
  }
  boolean isOptimizedTrueAssertion = cst != Constant.NotAConstant && cst.booleanValue() == true;
  boolean isOptimizedFalseAssertion = cst != Constant.NotAConstant && cst.booleanValue() == false;
 
  flowContext.tagBits |= FlowContext.HIDE_NULL_COMPARISON_WARNING;
  FlowInfo conditionFlowInfo = this.assertExpression.analyseCode(currentScope, flowContext, flowInfo.copy());
  flowContext.tagBits &= ~FlowContext.HIDE_NULL_COMPARISON_WARNING;
View Full Code Here

  Constant cst = this.assertExpression.optimizedBooleanConstant();
  if ((this.assertExpression.implicitConversion & TypeIds.UNBOXING) != 0) {
    this.assertExpression.checkNPE(currentScope, flowContext, flowInfo);
  }
  boolean isOptimizedTrueAssertion = cst != Constant.NotAConstant && cst.booleanValue() == true;
  boolean isOptimizedFalseAssertion = cst != Constant.NotAConstant && cst.booleanValue() == false;
 
  flowContext.tagBits |= FlowContext.HIDE_NULL_COMPARISON_WARNING;
  FlowInfo conditionFlowInfo = this.assertExpression.analyseCode(currentScope, flowContext, flowInfo.copy());
  flowContext.tagBits &= ~FlowContext.HIDE_NULL_COMPARISON_WARNING;
  UnconditionalFlowInfo assertWhenTrueInfo = conditionFlowInfo.initsWhenTrue().unconditionalInits();
View Full Code Here

    }
    this.preCondInitStateIndex =
      currentScope.methodScope().recordInitializationStates(flowInfo);

    Constant cst = this.condition == null ? null : this.condition.constant;
    boolean isConditionTrue = cst == null || (cst != Constant.NotAConstant && cst.booleanValue() == true);
    boolean isConditionFalse = cst != null && (cst != Constant.NotAConstant && cst.booleanValue() == false);

    cst = this.condition == null ? null : this.condition.optimizedBooleanConstant();
    boolean isConditionOptimizedTrue = cst == null ||  (cst != Constant.NotAConstant && cst.booleanValue() == true);
    boolean isConditionOptimizedFalse = cst != null && (cst != Constant.NotAConstant && cst.booleanValue() == false);
View Full Code Here

    this.preCondInitStateIndex =
      currentScope.methodScope().recordInitializationStates(flowInfo);

    Constant cst = this.condition == null ? null : this.condition.constant;
    boolean isConditionTrue = cst == null || (cst != Constant.NotAConstant && cst.booleanValue() == true);
    boolean isConditionFalse = cst != null && (cst != Constant.NotAConstant && cst.booleanValue() == false);

    cst = this.condition == null ? null : this.condition.optimizedBooleanConstant();
    boolean isConditionOptimizedTrue = cst == null ||  (cst != Constant.NotAConstant && cst.booleanValue() == true);
    boolean isConditionOptimizedFalse = cst != null && (cst != Constant.NotAConstant && cst.booleanValue() == false);
   
View Full Code Here

    Constant cst = this.condition == null ? null : this.condition.constant;
    boolean isConditionTrue = cst == null || (cst != Constant.NotAConstant && cst.booleanValue() == true);
    boolean isConditionFalse = cst != null && (cst != Constant.NotAConstant && cst.booleanValue() == false);

    cst = this.condition == null ? null : this.condition.optimizedBooleanConstant();
    boolean isConditionOptimizedTrue = cst == null ||  (cst != Constant.NotAConstant && cst.booleanValue() == true);
    boolean isConditionOptimizedFalse = cst != null && (cst != Constant.NotAConstant && cst.booleanValue() == false);
   
    // process the condition
    LoopingFlowContext condLoopContext = null;
    FlowInfo condInfo = flowInfo.nullInfoLessUnconditionalCopy();
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.