Package org.aspectj.apache.bcel.classfile

Examples of org.aspectj.apache.bcel.classfile.ConstantFloat


  public float getValueFloat() {
    if (type != PRIMITIVE_FLOAT) {
      throw new RuntimeException("Dont call getValueFloat() on a non FLOAT ElementValue");
    }
    ConstantFloat f = (ConstantFloat) cpool.getConstant(idx);
    return f.getValue();
  }
View Full Code Here


      return Long.toString(j.getValue());
    case PRIMITIVE_DOUBLE:
      ConstantDouble d = (ConstantDouble) cpool.getConstant(idx);
      return d.getValue().toString();
    case PRIMITIVE_FLOAT:
      ConstantFloat f = (ConstantFloat) cpool.getConstant(idx);
      return Float.toString(f.getValue());
    case PRIMITIVE_SHORT:
      ConstantInteger s = (ConstantInteger) cpool.getConstant(idx);
      return Integer.toString(s.getValue());
    case PRIMITIVE_BYTE:
      ConstantInteger b = (ConstantInteger) cpool.getConstant(idx);
View Full Code Here

    case PRIMITIVE_DOUBLE:
      ConstantDouble d = (ConstantDouble) cpool.getConstant(idx);
      s.append("(double)").append(d.getValue().toString());
      break;
    case PRIMITIVE_FLOAT:
      ConstantFloat f = (ConstantFloat) cpool.getConstant(idx);
      s.append("(float)").append(Float.toString(f.getValue()));
      break;
    case PRIMITIVE_SHORT:
      ConstantInteger ci = (ConstantInteger) cpool.getConstant(idx);
      s.append("(short)").append(Integer.toString(ci.getValue()));
      break;
View Full Code Here

  }

  public float getValueFloat() {
    if (type != PRIMITIVE_FLOAT)
      throw new RuntimeException("Dont call getValueFloat() on a non FLOAT ElementValue");
    ConstantFloat f = (ConstantFloat) cpool.getConstant(idx);
    return f.getValue();
  }
View Full Code Here

      return Long.toString(j.getValue());
    case PRIMITIVE_DOUBLE:
      ConstantDouble d = (ConstantDouble) cpool.getConstant(idx);
      return d.getValue().toString();
    case PRIMITIVE_FLOAT:
      ConstantFloat f = (ConstantFloat) cpool.getConstant(idx);
      return Float.toString(f.getValue());
    case PRIMITIVE_SHORT:
      ConstantInteger s = (ConstantInteger) cpool.getConstant(idx);
      return Integer.toString(s.getValue());
    case PRIMITIVE_BYTE:
      ConstantInteger b = (ConstantInteger) cpool.getConstant(idx);
View Full Code Here

        return Long.toString(j.getBytes());
        case PRIMITIVE_DOUBLE:
          ConstantDouble d = (ConstantDouble)cpGen.getConstant(idx);
        return Double.toString(d.getBytes());
        case PRIMITIVE_FLOAT:
          ConstantFloat f = (ConstantFloat)cpGen.getConstant(idx);
        return Float.toString(f.getBytes());
        case PRIMITIVE_SHORT:
        ConstantInteger s = (ConstantInteger)cpGen.getConstant(idx);
        return Integer.toString(s.getBytes());
        case PRIMITIVE_BYTE:
        ConstantInteger b = (ConstantInteger)cpGen.getConstant(idx);
View Full Code Here

    }
   
    public float getValueFloat() {
      if (type != PRIMITIVE_FLOAT)
        throw new RuntimeException("Dont call getValueFloat() on a non FLOAT ElementValue");
      ConstantFloat f = (ConstantFloat)cpool.getConstant(idx);
      return f.getBytes();
    }
View Full Code Here

        return Long.toString(j.getBytes());
        case PRIMITIVE_DOUBLE:
          ConstantDouble d = (ConstantDouble)cpool.getConstant(idx,Constants.CONSTANT_Double);
        return Double.toString(d.getBytes());
        case PRIMITIVE_FLOAT:
          ConstantFloat f = (ConstantFloat)cpool.getConstant(idx,Constants.CONSTANT_Float);
        return Float.toString(f.getBytes());
        case PRIMITIVE_SHORT:
        ConstantInteger s = (ConstantInteger)cpool.getConstant(idx,Constants.CONSTANT_Integer);
        return Integer.toString(s.getBytes());
        case PRIMITIVE_BYTE:
        ConstantInteger b = (ConstantInteger)cpool.getConstant(idx,Constants.CONSTANT_Integer);
View Full Code Here

  public int lookupFloat(float n) {
    int bits = Float.floatToIntBits(n);

    for(int i=1; i < index; i++) {
      if(constants[i] instanceof ConstantFloat) {
  ConstantFloat c = (ConstantFloat)constants[i];

  if(Float.floatToIntBits(c.getBytes()) == bits)
    return i;
      }
    }

    return -1;
View Full Code Here

      return ret; // Already in CP

    adjustSize();

    ret = index;
    constants[index++] = new ConstantFloat(n);

    return ret;
  }
View Full Code Here

TOP

Related Classes of org.aspectj.apache.bcel.classfile.ConstantFloat

Copyright © 2018 www.massapicom. 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.