This class inherits its alignment from its items, bumped up to
4 if the items have a looser alignment requirement. If
it is more than 4, then there will be a gap after the
output list size (which is four bytes) and before the first item.
| Modifier and Type | Field and Description |
|---|---|
| private static final int | HEADER_SIZE
the size of the list header |
| private final List | items
|
| private final ItemType | itemType
|
| Access | Constructor and Description |
|---|---|
| public | UniformListItem(ItemType
non-null; the type of the itemnon-null and non-empty; list of items to representConstructs an instance. |
| Modifier and Type | Method and Description |
|---|---|
| public void | addContents(DexFile
non-null; the file to populateImplements abstract org. DexFile with items from within this instance.
|
| private static int | Returns: >= 4; the alignment requirementnon-null; list of items being representedHelper for |
| public final List | |
| private int | |
| public ItemType | itemType()
Implements abstract org. |
| protected void | place0(Section
non-null; the section this instance has been added to>= 0; the offset from the start of the
section where this instance was placedOverrides org. |
| public final String | toHuman()
Implements abstract org. |
| public String | |
| private static int | Returns: >= 0; the write sizenon-null; the list in questionCalculates the write size for the given list. |
| protected void | writeTo0(DexFile
non-null; the file to use for referencenon-null; where to write toImplements abstract org. |
| HEADER_SIZE | back to summary |
|---|---|
| private static final int HEADER_SIZE the size of the list header | |
| items | back to summary |
|---|---|
| private final List<T> items
| |
| itemType | back to summary |
|---|---|
| private final ItemType itemType
| |
| UniformListItem | back to summary |
|---|---|
| public UniformListItem(ItemType itemType, List<T> items) Constructs an instance. It is illegal to modify the given list once it is used to construct an instance of this class. | |
| addContents | back to summary |
|---|---|
| public void addContents(DexFile file) Implements abstract org. Doc from org. Populates a Note Subclasses must override this to do something appropriate. | |
| getAlignment | back to summary |
|---|---|
| private static int getAlignment(List<? extends OffsettedItem> items) Helper for
| |
| getItems | back to summary |
|---|---|
| public final List Gets the underlying list of items.
| |
| headerSize | back to summary |
|---|---|
| private int headerSize() Get the size of the header of this list.
| |
| itemType | back to summary |
|---|---|
| public ItemType itemType() Implements abstract org. Doc from org. Returns the item type for this instance. | |
| place0 | back to summary |
|---|---|
| protected void place0(Section addedTo, int offset) Overrides org. Doc from org. Does additional work required when placing an instance. The default implementation of this method is a no-op. If a particular class needs to do something special, then it should override this method. In particular, if this instance did not know its write size up-front, then this method is responsible for setting it. | |
| toHuman | back to summary |
|---|---|
| public final String toHuman() Implements abstract org. Doc from org. Gets a short human-readable string representing this instance. | |
| toString | back to summary |
|---|---|
| public String toString() Overrides java. Doc from java. Returns a string representation of the object. | |
| writeSize | back to summary |
|---|---|
| private static int writeSize(List<? extends OffsettedItem> items) Calculates the write size for the given list.
| |
| writeTo0 | back to summary |
|---|---|
| protected void writeTo0(DexFile file, AnnotatedOutput out) Implements abstract org. Doc from org. Performs the actual write of the contents of this instance to
the given data section. This is called by
| |