Package org.aspectj.apache.bcel.classfile

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


    ConstantUtf8 c = (ConstantUtf8)cpool.getConstant(typeIndex,Constants.CONSTANT_Utf8);
    return c.getBytes();
  }
 
  public String getTypeName() {
    ConstantUtf8 c = (ConstantUtf8)cpool.getConstant(typeIndex,Constants.CONSTANT_Utf8);
    return Utility.signatureToString(c.getBytes());
  }
View Full Code Here


    dos.writeShort(typeIdx)// u2
    dos.writeShort(valueIdx); // u2
    }
   
    public String stringifyValue() {
      ConstantUtf8 cu8 = (ConstantUtf8)cpool.getConstant(valueIdx,Constants.CONSTANT_Utf8);
    return cu8.getBytes();
    }
View Full Code Here

      ConstantUtf8 cu8 = (ConstantUtf8)cpool.getConstant(valueIdx,Constants.CONSTANT_Utf8);
    return cu8.getBytes();
    }
   
    public String getEnumTypeString() {
      ConstantUtf8 cu8 = (ConstantUtf8)cpool.getConstant(typeIdx,Constants.CONSTANT_Utf8);
    return cu8.getBytes();//Utility.signatureToString(cu8.getBytes());
    }
View Full Code Here

      ConstantUtf8 cu8 = (ConstantUtf8)cpool.getConstant(typeIdx,Constants.CONSTANT_Utf8);
    return cu8.getBytes();//Utility.signatureToString(cu8.getBytes());
    }
   
  public String getEnumValueString() {
       ConstantUtf8 cu8 = (ConstantUtf8)cpool.getConstant(valueIdx,Constants.CONSTANT_Utf8);
    return cu8.getBytes();
  }
View Full Code Here

    public int getIndex() {
      return idx;
    }
    
    public String getClassString() {
    ConstantUtf8 c = (ConstantUtf8)cpool.getConstant(idx,Constants.CONSTANT_Utf8);
    return c.getBytes();
    }
View Full Code Here

    ConstantUtf8 c = (ConstantUtf8)cpool.getConstant(idx,Constants.CONSTANT_Utf8);
    return c.getBytes();
    }
   
    public String stringifyValue() {
      ConstantUtf8 cu8 = (ConstantUtf8)cpool.getConstant(idx,Constants.CONSTANT_Utf8);
      return cu8.getBytes();
    }
View Full Code Here

    return typeIndex;
  }
 
  public final String getTypeSignature() {
//    ConstantClass c = (ConstantClass)cpool.getConstant(typeIndex);
    ConstantUtf8 utf8 = (ConstantUtf8)cpool.getConstant(typeIndex/*c.getNameIndex()*/);
    return utf8.getBytes();
  }
View Full Code Here

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

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

      if(c instanceof ConstantString) {
  ConstantString s  = (ConstantString)c;
  ConstantUtf8   u8 = (ConstantUtf8)constants[s.getStringIndex()];

  string_table.put(u8.getBytes(), new Index(i));
      } else if(c instanceof ConstantClass) {
  ConstantClass s  = (ConstantClass)c;
  ConstantUtf8  u8 = (ConstantUtf8)constants[s.getNameIndex()];

  class_table.put(u8.getBytes(), new Index(i));
      } else if(c instanceof ConstantNameAndType) {
  ConstantNameAndType n    = (ConstantNameAndType)c;
  ConstantUtf8        u8   = (ConstantUtf8)constants[n.getNameIndex()];
  ConstantUtf8        u8_2 = (ConstantUtf8)constants[n.getSignatureIndex()];

  n_a_t_table.put(u8.getBytes() + NAT_DELIM + u8_2.getBytes(), new Index(i));
       } else if(c instanceof ConstantUtf8) {
         ConstantUtf8 u = (ConstantUtf8)c;
        
         utf8_table.put(u.getBytes(), new Index(i));
      } else if(c instanceof ConstantCP) {
  ConstantCP          m     = (ConstantCP)c;
  ConstantClass       clazz = (ConstantClass)constants[m.getClassIndex()];
  ConstantNameAndType n     = (ConstantNameAndType)constants[m.getNameAndTypeIndex()];
 
        ConstantUtf8 u8         = (ConstantUtf8)constants[clazz.getNameIndex()];
        String       class_name = u8.getBytes().replace('/', '.');

  u8 = (ConstantUtf8)constants[n.getNameIndex()];
  String method_name = u8.getBytes();

  u8 = (ConstantUtf8)constants[n.getSignatureIndex()];
  String signature = u8.getBytes();

  String delim = METHODREF_DELIM;

  if(c instanceof ConstantInterfaceMethodref)
    delim = IMETHODREF_DELIM;
View Full Code Here

      return ret; // Already in CP

    adjustSize();

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

    utf8_table.put(n, new Index(ret));

    return ret;
  }
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.