Package com.android.dx.cf.direct
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
Modifier and TypeFieldDescriptionstatic final StdAttributeFactory
non-null;
shared instance of this classFields inherited from class com.android.dx.cf.direct.AttributeFactory
CTX_CLASS, CTX_CODE, CTX_COUNT, CTX_FIELD, CTX_METHOD
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprotected Attribute
parse0
(DirectClassFile cf, int context, String name, int offset, int length, ParseObserver observer) Parses attribute content.Methods inherited from class com.android.dx.cf.direct.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:
parse0
in classAttributeFactory
- Parameters:
cf
-non-null;
class file to parse fromcontext
- context to parse in; one of theCTX_*
constantsname
-non-null;
the attribute nameoffset
- offset intobytes
to 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
-