org.cojen.classfile
Interface AttributeFactory
public interface AttributeFactory
Allows custom Attributes
to be constructed when a
ClassFile
is read from a stream. The factory will be invoked only
when an unknown type of attribute type is read.
- Author:
- Brian S O'Neill
createAttribute
Attribute createAttribute(ConstantPool cp,
String name,
int length,
DataInput din)
throws IOException
- Create an attribute, using the provided name to determine which type.
Return null if attribute type is unknown.
- Parameters:
cp
- ConstantPool, needed for constructing attributesname
- Name of attributelength
- Attribute length, in bytesdin
- Attribute data source
- Throws:
IOException
Copyright © 2004-2011 Brian S O'Neill. All Rights Reserved.