Package com.strobel.assembler.metadata
Class ClassFileReader
java.lang.Object
com.strobel.assembler.ir.MetadataReader
com.strobel.assembler.metadata.ClassFileReader
- Author:
- Mike Strobel
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final intstatic final intstatic final int -
Method Summary
Modifier and TypeMethodDescriptionprotected IMetadataScopegetScope()protected SourceAttributereadAttributeCore(String name, Buffer buffer, int originalOffset, int length) Reads aSourceAttributefrom the specified buffer.static TypeDefinitionreadClass(int options, IMetadataResolver resolver, Buffer b) static TypeDefinitionreadClass(IMetadataResolver resolver, Buffer b) protected final ModuleDependencyreadModuleDependency(Buffer buffer) protected final PackageInforeadPackageInfo(Buffer buffer) protected final ServiceInforeadServiceInfo(Buffer buffer) protected booleanprotected booleanMethods inherited from class com.strobel.assembler.ir.MetadataReader
inflateAttribute, inflateAttribute, inflateAttributes, inflateAttributes, readAttribute, readAttributes
-
Field Details
-
OPTION_PROCESS_ANNOTATIONS
public static final int OPTION_PROCESS_ANNOTATIONS- See Also:
-
OPTION_PROCESS_CODE
public static final int OPTION_PROCESS_CODE- See Also:
-
OPTIONS_DEFAULT
public static final int OPTIONS_DEFAULT- See Also:
-
-
Method Details
-
shouldProcessAnnotations
protected boolean shouldProcessAnnotations() -
shouldProcessCode
protected boolean shouldProcessCode() -
getScope
- Specified by:
getScopein classMetadataReader
-
getParser
- Specified by:
getParserin classMetadataReader
-
readAttributeCore
protected SourceAttribute readAttributeCore(String name, Buffer buffer, int originalOffset, int length) Reads aSourceAttributefrom the specified buffer.- Overrides:
readAttributeCorein classMetadataReader- 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().
-
readModuleDependency
-
readPackageInfo
-
readServiceInfo
-
readClass
-
readClass
-