public abstract class Item
extends java.lang.Object
| Constructor and Description |
|---|
Item()
Constructs an instance.
|
| Modifier and Type | Method and Description |
|---|---|
abstract void |
addContents(DexFile file)
Populates a
DexFile with items from within this instance. |
abstract ItemType |
itemType()
Returns the item type for this instance.
|
java.lang.String |
typeName()
Returns the human name for the particular type of item this
instance is.
|
abstract int |
writeSize()
Gets the size of this instance when written, in bytes.
|
abstract void |
writeTo(DexFile file,
AnnotatedOutput out)
Writes the representation of this instance to the given data section,
using the given
DexFile to look things up as needed. |
public abstract ItemType itemType()
non-null; the item typepublic final java.lang.String typeName()
non-null; the namepublic abstract int writeSize()
>= 0; the write sizepublic abstract void addContents(DexFile file)
DexFile with items from within this instance.
This will not add an item to the file for this instance itself
(which should have been done by whatever refers to this instance).
Note: Subclasses must override this to do something appropriate.
file - non-null; the file to populatepublic abstract void writeTo(DexFile file, AnnotatedOutput out)
DexFile to look things up as needed.
If this instance keeps track of its offset, then this method will
note the written offset and will also throw an exception if this
instance has already been written.file - non-null; the file to use for referenceout - non-null; where to write toCopyright © 2020. All Rights Reserved.