Examples of ConstantLong


Examples of org.apache.bcel.classfile.ConstantLong

     * @return index on success, -1 otherwise
     */
    public int lookupLong( long n ) {
        for (int i = 1; i < index; i++) {
            if (constants[i] instanceof ConstantLong) {
                ConstantLong c = (ConstantLong) constants[i];
                if (c.getBytes() == n) {
                    return i;
                }
            }
        }
        return -1;
View Full Code Here

Examples of org.apache.bcel.classfile.ConstantLong

        if ((ret = lookupLong(n)) != -1) {
            return ret; // Already in CP
        }
        adjustSize();
        ret = index;
        constants[index] = new ConstantLong(n);
        index += 2; // Wastes one entry according to spec
        return ret;
    }
View Full Code Here

Examples of org.apache.bcel.classfile.ConstantLong

                    ConstantInteger c = (ConstantInteger) constant;
                    result.append("int\t");
                    result.append(constPool.constantToString(c));
                    result.append(';');
                } else if (constant instanceof ConstantLong) {
                    ConstantLong c = (ConstantLong) constant;
                    result.append("long\t");
                    result.append(constPool.constantToString(c));
                    result.append(';');
                } else if (constant instanceof ConstantClass) {
                    ConstantClass c = (ConstantClass) constant;
                    result.append("class\t#");
                    result.append(c.getNameIndex());
                    result.append(";\t//  ");
                    result.append(constPool.constantToString(c));
                } else if (constant instanceof ConstantString) {
                    ConstantString c = (ConstantString) constant;
                    result.append("String\t#");
                    result.append(c.getStringIndex());
                    result.append(";\t//  ");
                    result.append(constPool.constantToString(c));
                }

                result.append(n);
View Full Code Here

Examples of org.apache.bcel.classfile.ConstantLong

                    ConstantInteger c = (ConstantInteger) constant;
                    result.append("int\t");
                    result.append(constPool.constantToString(c));
                    result.append(';');
                } else if (constant instanceof ConstantLong) {
                    ConstantLong c = (ConstantLong) constant;
                    result.append("long\t");
                    result.append(constPool.constantToString(c));
                    result.append(';');
                } else if (constant instanceof ConstantClass) {
                    ConstantClass c = (ConstantClass) constant;
                    result.append("class\t#");
                    result.append(c.getNameIndex());
                    result.append(";\t//  ");
                    result.append(constPool.constantToString(c));
                } else if (constant instanceof ConstantString) {
                    ConstantString c = (ConstantString) constant;
                    result.append("String\t#");
                    result.append(c.getStringIndex());
                    result.append(";\t//  ");
                    result.append(constPool.constantToString(c));
                }

                result.append(n);
View Full Code Here

Examples of org.apache.bcel.classfile.ConstantLong

     * @return index on success, -1 otherwise
     */
    public int lookupLong( long n ) {
        for (int i = 1; i < index; i++) {
            if (constants[i] instanceof ConstantLong) {
                ConstantLong c = (ConstantLong) constants[i];
                if (c.getBytes() == n) {
                    return i;
                }
            }
        }
        return -1;
View Full Code Here

Examples of org.apache.bcel.classfile.ConstantLong

        if ((ret = lookupLong(n)) != -1) {
            return ret; // Already in CP
        }
        adjustSize();
        ret = index;
        constants[index] = new ConstantLong(n);
        index += 2; // Wastes one entry according to spec
        return ret;
    }
View Full Code Here

Examples of org.apache.bcel.classfile.ConstantLong

    {
    case PRIMITIVE_INT:
      ConstantInteger c = (ConstantInteger) cpGen.getConstant(idx);
      return Integer.toString(c.getBytes());
    case PRIMITIVE_LONG:
      ConstantLong j = (ConstantLong) cpGen.getConstant(idx);
      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);
View Full Code Here

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

  public long getValueLong() {
    if (type != PRIMITIVE_LONG) {
      throw new RuntimeException("Dont call getValueLong() on a non LONG ElementValue");
    }
    ConstantLong j = (ConstantLong) cpool.getConstant(idx);
    return j.getValue();
  }
View Full Code Here

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

    switch (type) {
    case PRIMITIVE_INT:
      ConstantInteger c = (ConstantInteger) cpool.getConstant(idx);
      return Integer.toString(c.getValue());
    case PRIMITIVE_LONG:
      ConstantLong j = (ConstantLong) cpool.getConstant(idx);
      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);
View Full Code Here

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

    case PRIMITIVE_INT:
      ConstantInteger c = (ConstantInteger) cpool.getConstant(idx);
      s.append("(int)").append(Integer.toString(c.getValue()));
      break;
    case PRIMITIVE_LONG:
      ConstantLong j = (ConstantLong) cpool.getConstant(idx);
      s.append("(long)").append(Long.toString(j.getValue()));
      break;
    case PRIMITIVE_DOUBLE:
      ConstantDouble d = (ConstantDouble) cpool.getConstant(idx);
      s.append("(double)").append(d.getValue().toString());
      break;
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.