Class AttributeInfo

java.lang.Object
org.fife.rsta.ac.java.classreader.attributes.AttributeInfo
Direct Known Subclasses:
Code, ConstantValue, Exceptions, Signature, SourceFile, UnsupportedAttribute

public abstract class AttributeInfo extends Object
Represents an "attribute_info" structure in a class file.
Version:
1.0
  • Field Details

    • cf

      private ClassFile cf
    • attributeNameIndex

      private int attributeNameIndex
  • Constructor Details

    • AttributeInfo

      protected AttributeInfo(ClassFile cf)
  • Method Details

    • getClassFile

      public ClassFile getClassFile()
    • getName

      public String getName()
      Returns the name of this attribute.
      Returns:
      The name of this attribute.
    • readUnsupportedAttribute

      public static UnsupportedAttribute readUnsupportedAttribute(ClassFile cf, DataInputStream in, String attrName, int attrLength) throws IOException
      Reads an unknown/unsupported attribute from an input stream.
      Parameters:
      cf - The class file containing the attribute.
      in - The input stream to read from.
      attrName - The name of the attribute.
      attrLength - The length of the data to read from in, in bytes.
      Returns:
      The attribute.
      Throws:
      IOException - If an IO error occurs.