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

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


      org.eclipse.jdt.internal.compiler.ast.Expression compilerExpression = (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());
          case TypeIds.T_boolean : return constant.booleanValue() ? Boolean.TRUE : Boolean.FALSE;
View Full Code Here


      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:
          return new Character(constant.charValue());
        case TypeIds.T_double:
          return new Double(constant.doubleValue());
        case TypeIds.T_float:
View Full Code Here

                } else if (constant instanceof FloatConstant) {
                    return constant.floatValue();
                } else if (constant instanceof ShortConstant) {
                    return constant.shortValue();
                } else if (constant instanceof ByteConstant) {
                    return constant.byteValue();
                }
            }
            return null;
        }
View Full Code Here

                } else if (constant instanceof FloatConstant) {
                    return constant.floatValue();
                } else if (constant instanceof ShortConstant) {
                    return constant.shortValue();
                } else if (constant instanceof ByteConstant) {
                    return constant.byteValue();
                }
            }
            return null;
        }
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.