Class StdAttributeFactory
java.lang.Object
com.android.dx.cf.direct.AttributeFactory
com.android.dx.cf.direct.StdAttributeFactory
Standard subclass of
AttributeFactory, which knows how to parse
all the standard attribute types.-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final StdAttributeFactorynon-null;shared instance of this classFields inherited from class AttributeFactory
CTX_CLASS, CTX_CODE, CTX_COUNT, CTX_FIELD, CTX_METHOD -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected Attributeparse0(DirectClassFile cf, int context, String name, int offset, int length, ParseObserver observer) Parses attribute content.Methods inherited from class AttributeFactory
parse
-
Field Details
-
THE_ONE
non-null;shared instance of this class
-
-
Constructor Details
-
StdAttributeFactory
public StdAttributeFactory()Constructs an instance.
-
-
Method Details
-
parse0
protected Attribute parse0(DirectClassFile cf, int context, String name, int offset, int length, ParseObserver observer) Parses attribute content. The base class implements this by constructing an instance ofRawAttribute. Subclasses are expected to override this to do something better in most cases.- Overrides:
parse0in classAttributeFactory- Parameters:
cf-non-null;class file to parse fromcontext- context to parse in; one of theCTX_*constantsname-non-null;the attribute nameoffset- offset intobytesto start parsing at; this is the offset to the start of attribute data, not to the headerlength- the length of the attribute dataobserver-null-ok;parse observer to report to, if any- Returns:
non-null;an appropriately-constructedAttribute
-