public interface AttributeInfoReader
AttributeInfo
s.
It's also used as a Service Provider Interface (SPI) for the same reason.
Modifier and Type | Method and Description |
---|---|
boolean |
isAttributeInfoReadingSupportedFor(java.lang.String name)
Returns
true if, and only if, this AttributeInfoReader supports reading an AttributeInfo given a String with its name, false otherwise. |
AttributeInfo |
readAttributeInfo(java.io.DataInput dataInput,
int attributeNameIndex,
java.util.List<CPInfo> constantPool)
Returns an
AttributeInfo based on the data provided by dataInput . |
AttributeInfo readAttributeInfo(java.io.DataInput dataInput, int attributeNameIndex, java.util.List<CPInfo> constantPool)
AttributeInfo
based on the data provided by dataInput
.
If either dataInput
, constantPool
or any entries in constantPool
are null
, a NullPointerException
may be thrown. But no guarantees can be made.
If the AttributeInfo
cannot be read, a NodeFormatException
should be thrown.
If attributeNameIndex
is less than or equal to 0
, an IllegalArgumentException
may be thrown. But no guarantees can be made.
dataInput
- the DataInput
to read the data fromattributeNameIndex
- the attribute_name_index of the AttributeInfo
to readconstantPool
- a List
of CPInfo
s that represents the constant_pool tableAttributeInfo
based on the data provided by dataInput
java.lang.IllegalArgumentException
- thrown if, and only if, attributeNameIndex
is less than or equal to 0
NodeFormatException
- thrown if, and only if, the AttributeInfo
cannot be readjava.lang.NullPointerException
- thrown if, and only if, either dataInput
, constantPool
or any entries in constantPool
are null
boolean isAttributeInfoReadingSupportedFor(java.lang.String name)
true
if, and only if, this AttributeInfoReader
supports reading an AttributeInfo
given a String
with its name, false
otherwise.
If name
is null
, a NullPointerException
may be thrown. But no guarantees can be made.
name
- the String
with the name for the AttributeInfo
we are eventually about to readtrue
if, and only if, this AttributeInfoReader
supports reading an AttributeInfo
given a String
with its name, false
otherwisejava.lang.NullPointerException
- thrown if, and only if, name
is null