Package org.aspectj.apache.bcel.classfile

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


      file.println("<P><TT>" + ref + "</TT><UL>" +
       "<LI><A HREF=\"#cp" + name_index + "\">Name index(" + name_index +   ")</A></UL>\n");
      break;
 
    case CONSTANT_String:
      ConstantString c5 = (ConstantString)constant_pool.getConstant(index, CONSTANT_String);
      name_index = c5.getStringIndex();

      String str = Class2HTML.toHTML(constant_pool.constantToString(index, tag));
 
      file.println("<P><TT>" + str + "</TT><UL>" +
       "<LI><A HREF=\"#cp" + name_index + "\">Name index(" + name_index +  ")</A></UL>\n");
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()];
View Full Code Here

    int utf8 = addUtf8(str);

    adjustSize();

    ConstantString s  = new ConstantString(utf8);
      
    ret = index;
    constants[index++] = s;

    string_table.put(str, new Index(ret));
View Full Code Here

  public int addConstant(Constant c, ConstantPoolGen cp) {
    Constant[] constants = cp.getConstantPool().getConstantPool();

    switch(c.getTag()) {
    case Constants.CONSTANT_String: {
      ConstantString s  = (ConstantString)c;
      ConstantUtf8   u8 = (ConstantUtf8)constants[s.getStringIndex()];

      return addString(u8.getBytes());
    }

    case Constants.CONSTANT_Class: {
      ConstantClass s  = (ConstantClass)c;
      ConstantUtf8  u8 = (ConstantUtf8)constants[s.getNameIndex()];

      return addClass(u8.getBytes());
    }

    case Constants.CONSTANT_NameAndType: {
View Full Code Here

TOP

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

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.