Package org.aspectj.apache.bcel.classfile

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


  public String getValueString() {
    if (type != STRING) {
      throw new RuntimeException("Dont call getValueString() on a non STRING ElementValue");
    }
    ConstantUtf8 c = (ConstantUtf8) cpool.getConstant(idx);
    return c.getValue();
  }
View Full Code Here


        return "false";
      } else {
        return "true";
      }
    case STRING:
      ConstantUtf8 cu8 = (ConstantUtf8) cpool.getConstant(idx);
      return cu8.getValue();

    default:
      throw new RuntimeException("SimpleElementValueGen class does not know how to stringify type " + type);
    }
  }
View Full Code Here

      } else {
        s.append("true");
      }
      break;
    case STRING:
      ConstantUtf8 cu8 = (ConstantUtf8) cpool.getConstant(idx);
      s.append("(string)").append(cu8.getValue());
      break;
    default:
      throw new RuntimeException("SimpleElementValueGen class does not know how to stringify type " + type);
    }
    return s.toString();
View Full Code Here

   * return signature and value, something like Lp/Color;RED
   */
  @Override
  public String stringifyValue() {
    StringBuffer sb = new StringBuffer();
    ConstantUtf8 cu8 = (ConstantUtf8) cpool.getConstant(typeIdx, Constants.CONSTANT_Utf8);
    sb.append(cu8.getValue());
    cu8 = (ConstantUtf8) cpool.getConstant(valueIdx, Constants.CONSTANT_Utf8);
    sb.append(cu8.getValue());
    return sb.toString();
  }
View Full Code Here

  public int getIndex() {
    return idx;
  }

  public String getClassString() {
    ConstantUtf8 cu8 = (ConstantUtf8) getConstantPool().getConstant(idx);
    return cu8.getValue();
    // ConstantClass c = (ConstantClass)getConstantPool().getConstant(idx);
    // ConstantUtf8 utf8 = (ConstantUtf8)getConstantPool().getConstant(c.getNameIndex());
    // return utf8.getBytes();
  }
View Full Code Here

  public int getTypeIndex() {
    return typeIndex;
  }

  public String getTypeSignature() {
    ConstantUtf8 utf8 = (ConstantUtf8) cpool.getConstant(typeIndex);
    return utf8.getValue();
  }
View Full Code Here

   * return signature and value, something like Lp/Color;RED
   */
  @Override
  public String stringifyValue() {
    StringBuffer sb = new StringBuffer();
    ConstantUtf8 cu8 = (ConstantUtf8) cpool.getConstant(typeIdx, Constants.CONSTANT_Utf8);
    sb.append(cu8.getValue());
    cu8 = (ConstantUtf8) cpool.getConstant(valueIdx, Constants.CONSTANT_Utf8);
    sb.append(cu8.getValue());
    return sb.toString();
  }
View Full Code Here

  }

  public String getValueString() {
    if (type != STRING)
      throw new RuntimeException("Dont call getValueString() on a non STRING ElementValue");
    ConstantUtf8 c = (ConstantUtf8) cpool.getConstant(idx);
    return c.getValue();
  }
View Full Code Here

      if (bo.getValue() == 0)
        return "false";
      else
        return "true";
    case STRING:
      ConstantUtf8 cu8 = (ConstantUtf8) cpool.getConstant(idx);
      return cu8.getValue();

    default:
      throw new RuntimeException("SimpleElementValueGen class does not know how to stringify type " + type);
    }
  }
View Full Code Here

    dos.writeShort(typeIdx)// u2
    dos.writeShort(valueIdx); // u2
    }
   
    public String stringifyValue() {
      ConstantUtf8 cu8 = (ConstantUtf8)getConstantPool().getConstant(valueIdx);
    return cu8.getBytes();
//      ConstantString cu8 = (ConstantString)getConstantPool().getConstant(valueIdx);
//      return ((ConstantUtf8)getConstantPool().getConstant(cu8.getStringIndex())).getBytes();
    }
View Full Code Here

TOP

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

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.