com.android.dx.cf.direct
Class StdAttributeFactory

java.lang.Object
  extended by com.android.dx.cf.direct.AttributeFactory
      extended by com.android.dx.cf.direct.StdAttributeFactory

public class StdAttributeFactory
extends AttributeFactory

Standard subclass of AttributeFactory, which knows how to parse all the standard attribute types.


Field Summary
static StdAttributeFactory THE_ONE
          non-null; shared instance of this class
 
Fields inherited from class com.android.dx.cf.direct.AttributeFactory
CTX_CLASS, CTX_CODE, CTX_COUNT, CTX_FIELD, CTX_METHOD
 
Constructor Summary
StdAttributeFactory()
          Constructs an instance.
 
Method Summary
protected  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
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

THE_ONE

public static final StdAttributeFactory THE_ONE
non-null; shared instance of this class

Constructor Detail

StdAttributeFactory

public StdAttributeFactory()
Constructs an instance.

Method Detail

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 of RawAttribute. Subclasses are expected to override this to do something better in most cases.

Overrides:
parse0 in class AttributeFactory
Parameters:
cf - non-null; class file to parse from
context - context to parse in; one of the CTX_* constants
name - non-null; the attribute name
offset - offset into bytes to start parsing at; this is the offset to the start of attribute data, not to the header
length - the length of the attribute data
observer - null-ok; parse observer to report to, if any
Returns:
non-null; an appropriately-constructed Attribute


Copyright © 2015. All rights reserved.