Class StdAttributeFactory

java.lang.Object
com.android.dx.cf.direct.AttributeFactory
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 Details

    • THE_ONE

      public static final StdAttributeFactory 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 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