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 java.lang.ObjectRepresents an "attribute_info" structure in a class file.- Version:
- 1.0
-
-
Field Summary
Fields Modifier and Type Field Description private intattributeNameIndexprivate ClassFilecf
-
Constructor Summary
Constructors Modifier Constructor Description protectedAttributeInfo(ClassFile cf)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description ClassFilegetClassFile()java.lang.StringgetName()Returns the name of this attribute.static UnsupportedAttributereadUnsupportedAttribute(ClassFile cf, java.io.DataInputStream in, java.lang.String attrName, int attrLength)Reads an unknown/unsupported attribute from an input stream.
-
-
-
Field Detail
-
cf
private ClassFile cf
-
attributeNameIndex
private int attributeNameIndex
-
-
Constructor Detail
-
AttributeInfo
protected AttributeInfo(ClassFile cf)
-
-
Method Detail
-
getClassFile
public ClassFile getClassFile()
-
getName
public java.lang.String getName()
Returns the name of this attribute.- Returns:
- The name of this attribute.
-
readUnsupportedAttribute
public static UnsupportedAttribute readUnsupportedAttribute(ClassFile cf, java.io.DataInputStream in, java.lang.String attrName, int attrLength) throws java.io.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 fromin, in bytes.- Returns:
- The attribute.
- Throws:
java.io.IOException- If an IO error occurs.
-
-