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

Method Summary
 Attribute createAttribute(ConstantPool cp, String name, int length, DataInput din)
          Create an attribute, using the provided name to determine which type.
 

Method Detail

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 attributes
name - Name of attribute
length - Attribute length, in bytes
din - Attribute data source
Throws:
IOException


Copyright © 2004-2011 Brian S O'Neill. All Rights Reserved.