public abstract class MetadataReader
extends java.lang.Object
| Modifier | Constructor and Description |
|---|---|
protected |
MetadataReader() |
| Modifier and Type | Method and Description |
|---|---|
protected abstract MetadataParser |
getParser() |
protected abstract IMetadataScope |
getScope() |
protected SourceAttribute |
inflateAttribute(Buffer buffer,
SourceAttribute attribute) |
protected SourceAttribute |
inflateAttribute(SourceAttribute attribute) |
protected void |
inflateAttributes(java.util.List<SourceAttribute> attributes) |
protected void |
inflateAttributes(SourceAttribute[] attributes) |
SourceAttribute |
readAttribute(Buffer buffer) |
protected SourceAttribute |
readAttributeCore(java.lang.String name,
Buffer buffer,
int originalOffset,
int length)
Reads a
SourceAttribute from the specified buffer. |
void |
readAttributes(Buffer input,
SourceAttribute[] attributes) |
protected abstract IMetadataScope getScope()
protected abstract MetadataParser getParser()
public void readAttributes(Buffer input, SourceAttribute[] attributes)
public SourceAttribute readAttribute(Buffer buffer)
protected SourceAttribute readAttributeCore(java.lang.String name, Buffer buffer, int originalOffset, int length)
SourceAttribute from the specified buffer.name - The name of the attribute to decode.buffer - A buffer containing the attribute blob.originalOffset - The offset of position 0 in the buffer relative to the start of the original class file.
This is needed during lazy inflation of CodeAttribute (and possibly others). In
the case of CodeAttribute, it is helpful to know exactly where each method's body
begins so we can load it on demand at some point in the future.length - The length of the attribute. Implementations should not rely on buffer.size().protected void inflateAttributes(SourceAttribute[] attributes)
protected final SourceAttribute inflateAttribute(SourceAttribute attribute)
protected final SourceAttribute inflateAttribute(Buffer buffer, SourceAttribute attribute)
protected void inflateAttributes(java.util.List<SourceAttribute> attributes)