Package org.apache.tomcat.util.bcel.classfile

Examples of org.apache.tomcat.util.bcel.classfile.ConstantUtf8


     */
    public static final Attribute readAttribute(DataInputStream file,
            ConstantPool constant_pool) throws IOException,
            ClassFormatException
    {
        ConstantUtf8 c;
        String name;
        int name_index;
        int length;
        byte tag = Constants.ATTR_UNKNOWN; // Unknown attribute
        // Get class name from constant pool via `name_index' indirection
        name_index = file.readUnsignedShort();
        c = (ConstantUtf8) constant_pool.getConstant(name_index,
                Constants.CONSTANT_Utf8);
        name = c.getBytes();
        // Length of data in bytes
        length = file.readInt();
        // Compare strings to find known attribute
        // System.out.println(name);
        for (byte i = 0; i < Constants.KNOWN_ATTRIBUTES; i++)
View Full Code Here


    /**
     * @return Name of attribute
     */
    public String getName()
    {
        ConstantUtf8 c = (ConstantUtf8) constant_pool.getConstant(name_index,
                Constants.CONSTANT_Utf8);
        return c.getBytes();
    }
View Full Code Here

   */
  public static final Attribute readAttribute(DataInputStream file,
      ConstantPool constant_pool) throws IOException,
      ClassFormatException
  {
    ConstantUtf8 c;
    String name;
    int name_index;
    int length;
    byte tag = Constants.ATTR_UNKNOWN; // Unknown attribute
    // Get class name from constant pool via `name_index' indirection
    name_index = file.readUnsignedShort();
    c = (ConstantUtf8) constant_pool.getConstant(name_index,
        Constants.CONSTANT_Utf8);
    name = c.getBytes();
    // Length of data in bytes
    length = file.readInt();
    // Compare strings to find known attribute
    // System.out.println(name);
    for (byte i = 0; i < Constants.KNOWN_ATTRIBUTES; i++)
View Full Code Here

  /**
   * @return Name of attribute
   */
  public String getName()
  {
    ConstantUtf8 c = (ConstantUtf8) constant_pool.getConstant(name_index,
        Constants.CONSTANT_Utf8);
    return c.getBytes();
  }
View Full Code Here

TOP

Related Classes of org.apache.tomcat.util.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.