Package org.aspectj.apache.bcel.classfile

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


  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)
View Full Code Here


    adjustSize();

    name_index      = addUtf8(name);
    signature_index = addUtf8(signature);
    ret = index;
    constants[index++] = new ConstantNameAndType(name_index, signature_index);

    n_a_t_table.put(name + NAT_DELIM + signature, new Index(ret));
    return ret;
  }
View Full Code Here

      return addClass(u8.getBytes());
    }

    case Constants.CONSTANT_NameAndType: {
      ConstantNameAndType n    = (ConstantNameAndType)c;
      ConstantUtf8        u8   = (ConstantUtf8)constants[n.getNameIndex()];
      ConstantUtf8        u8_2 = (ConstantUtf8)constants[n.getSignatureIndex()];

      return addNameAndType(u8.getBytes(), u8_2.getBytes());
    }

    case Constants.CONSTANT_Utf8:
      return addUtf8(((ConstantUtf8)c).getBytes());

    case Constants.CONSTANT_Double:
      return addDouble(((ConstantDouble)c).getBytes());

    case Constants.CONSTANT_Float:
      return addFloat(((ConstantFloat)c).getBytes());

    case Constants.CONSTANT_Long:
      return addLong(((ConstantLong)c).getBytes());

    case Constants.CONSTANT_Integer:
      return addInteger(((ConstantInteger)c).getBytes());

    case Constants.CONSTANT_InterfaceMethodref: case Constants.CONSTANT_Methodref:
    case Constants.CONSTANT_Fieldref: {
      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 name = u8.getBytes();

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

      switch(c.getTag()) {
      case Constants.CONSTANT_InterfaceMethodref:
  return addInterfaceMethodref(class_name, name, signature);
View Full Code Here

TOP

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

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.