com.go.trove.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.

Version:
1 , 00/11/27
Author:
Brian S O'Neill

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

Method Detail

createAttribute

public Attribute createAttribute(ConstantPool cp,
                                 java.lang.String name,
                                 int length,
                                 java.io.DataInput din)
                          throws java.io.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