Package com.strobel.assembler.ir
Class MetadataReader
- java.lang.Object
-
- com.strobel.assembler.ir.MetadataReader
-
- Direct Known Subclasses:
ClassFileReader
public abstract class MetadataReader extends java.lang.Object
-
-
Constructor Summary
Constructors Modifier Constructor Description protectedMetadataReader()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description protected abstract MetadataParsergetParser()protected abstract IMetadataScopegetScope()protected SourceAttributeinflateAttribute(SourceAttribute attribute)protected SourceAttributeinflateAttribute(Buffer buffer, SourceAttribute attribute)protected voidinflateAttributes(SourceAttribute[] attributes)protected voidinflateAttributes(java.util.List<SourceAttribute> attributes)SourceAttributereadAttribute(Buffer buffer)protected SourceAttributereadAttributeCore(java.lang.String name, Buffer buffer, int originalOffset, int length)Reads aSourceAttributefrom the specified buffer.voidreadAttributes(Buffer input, SourceAttribute[] attributes)
-
-
-
Method Detail
-
getScope
protected abstract IMetadataScope getScope()
-
getParser
protected abstract MetadataParser getParser()
-
readAttributes
public void readAttributes(Buffer input, SourceAttribute[] attributes)
-
readAttribute
public SourceAttribute readAttribute(Buffer buffer)
-
readAttributeCore
protected SourceAttribute readAttributeCore(java.lang.String name, Buffer buffer, int originalOffset, int length)
Reads aSourceAttributefrom the specified buffer.- Parameters:
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 ofCodeAttribute(and possibly others). In the case ofCodeAttribute, 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 onbuffer.size().
-
inflateAttributes
protected void inflateAttributes(SourceAttribute[] attributes)
-
inflateAttribute
protected final SourceAttribute inflateAttribute(SourceAttribute attribute)
-
inflateAttribute
protected final SourceAttribute inflateAttribute(Buffer buffer, SourceAttribute attribute)
-
inflateAttributes
protected void inflateAttributes(java.util.List<SourceAttribute> attributes)
-
-