|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.android.dx.cf.direct.AttributeFactory
public class AttributeFactory
Factory capable of instantiating various Attribute subclasses
depending on the context and name.
| Field Summary | |
|---|---|
static int |
CTX_CLASS
context for attributes on class files |
static int |
CTX_CODE
context for attributes on code attributes |
static int |
CTX_COUNT
number of contexts |
static int |
CTX_FIELD
context for attributes on fields |
static int |
CTX_METHOD
context for attributes on methods |
| Constructor Summary | |
|---|---|
AttributeFactory()
Constructs an instance. |
|
| Method Summary | |
|---|---|
Attribute |
parse(DirectClassFile cf,
int context,
int offset,
ParseObserver observer)
Parses and makes an attribute based on the bytes at the indicated position in the given array. |
protected Attribute |
parse0(DirectClassFile cf,
int context,
String name,
int offset,
int length,
ParseObserver observer)
Parses attribute content. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final int CTX_CLASS
public static final int CTX_FIELD
public static final int CTX_METHOD
public static final int CTX_CODE
public static final int CTX_COUNT
| Constructor Detail |
|---|
public AttributeFactory()
| Method Detail |
|---|
public final Attribute parse(DirectClassFile cf,
int context,
int offset,
ParseObserver observer)
parse0(com.android.dx.cf.direct.DirectClassFile, int, java.lang.String, int, int, com.android.dx.cf.iface.ParseObserver),
which does the actual construction.
cf - non-null; class file to parse fromcontext - context to parse in; one of the CTX_*
constantsoffset - offset into dcf's bytes
to start parsing atobserver - null-ok; parse observer to report to, if any
non-null; an appropriately-constructed Attribute
protected Attribute parse0(DirectClassFile cf,
int context,
String name,
int offset,
int length,
ParseObserver observer)
RawAttribute. Subclasses are expected to
override this to do something better in most cases.
cf - non-null; class file to parse fromcontext - context to parse in; one of the CTX_*
constantsname - non-null; the attribute nameoffset - offset into bytes 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
non-null; an appropriately-constructed Attribute
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||