Attribute
| Modifier and Type | Method and Description |
|---|---|
| public Attribute | Returns: The user-defined AttributeReader should take this data and use it to construct an attribute. In the case of errors, a null can be returned which will cause the parsing of the class file to fail.An index into the constant pool, indexing a ConstantUtf8 that represents the name of the attribute. nameIndex, int The length of the data contained in the attribute. This is written into the constant pool and should
agree with what the factory expects the length to be. length, DataInput This is the data input that the factory needs to read its data from. file, ConstantPool This is the constant pool associated with the Attribute that we are constructing. constantPool)When this attribute reader is added via the static method Attribute.addAttributeReader, an attribute name is associated with it. |
| createAttribute | back to summary |
|---|---|
| public Attribute createAttribute(int nameIndex, int length, DataInput file, ConstantPool constantPool) When this attribute reader is added via the static method Attribute.addAttributeReader, an attribute name is associated with it. As the class file parser parses attributes, it will call various AttributeReaders based on the name of the attributes it is constructing.
| |