Top Description Constructors Methods
org.droidparts.dexmaker.dx.dex.file

public abstract Class Item

extends Object
Class Inheritance
Known Direct Subclasses
org.droidparts.dexmaker.dx.dex.file.OffsettedItem, org.droidparts.dexmaker.dx.dex.file.IndexedItem
Imports
org.droidparts.dexmaker.dx.util.AnnotatedOutput

Base class for any structurally-significant and (potentially) repeated piece of a Dalvik file.

Constructor Summary

AccessConstructor and Description
public
Item()

Constructs an instance.

Method Summary

Modifier and TypeMethod and Description
public abstract void
addContents(DexFile
non-null; the file to populate
file
)

Populates a DexFile with items from within this instance.

public abstract ItemType

Returns:

non-null; the item type
itemType
()

Returns the item type for this instance.

public final String

Returns:

non-null; the name
typeName
()

Returns the human name for the particular type of item this instance is.

public abstract int

Returns:

>= 0; the write size
writeSize
()

Gets the size of this instance when written, in bytes.

public abstract void
writeTo(DexFile
non-null; the file to use for reference
file
,
AnnotatedOutput
non-null; where to write to
out
)

Writes the representation of this instance to the given data section, using the given DexFile to look things up as needed.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Constructor Detail

Itemback to summary
public Item()

Constructs an instance.

Method Detail

addContentsback to summary
public abstract void addContents(DexFile file)

Populates a 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.

Parameters
file:DexFile

non-null; the file to populate

itemTypeback to summary
public abstract ItemType itemType()

Returns the item type for this instance.

Returns:ItemType

non-null; the item type

typeNameback to summary
public final String typeName()

Returns the human name for the particular type of item this instance is.

Returns:String

non-null; the name

writeSizeback to summary
public abstract int writeSize()

Gets the size of this instance when written, in bytes.

Returns:int

>= 0; the write size

writeToback to summary
public 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. 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.

Parameters
file:DexFile

non-null; the file to use for reference

out:AnnotatedOutput

non-null; where to write to