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

public final Class TypeIdItem

extends IdItem
Class Inheritance
Imports
org.droidparts.dexmaker.dx.dex.SizeOf, org.droidparts.dexmaker.dx.rop.cst.CstString, .CstType, org.droidparts.dexmaker.dx.util.AnnotatedOutput, .Hex

Representation of a type reference inside a Dalvik file.

Constructor Summary

AccessConstructor and Description
public
TypeIdItem(CstType
non-null; the constant for the type
type
)

Constructs an instance.

Method Summary

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

Overrides org.droidparts.dexmaker.dx.dex.file.IdItem.addContents.

Populates a DexFile with items from within this instance.
public ItemType
itemType()

Implements abstract org.droidparts.dexmaker.dx.dex.file.Item.itemType.

Returns the item type for this instance.
public int
writeSize()

Implements abstract org.droidparts.dexmaker.dx.dex.file.Item.writeSize.

Gets the size of this instance when written, in bytes.
public void
writeTo(DexFile
non-null; the file to use for reference
file
,
AnnotatedOutput
non-null; where to write to
out
)

Implements abstract org.droidparts.dexmaker.dx.dex.file.Item.writeTo.

Writes the representation of this instance to the given data section, using the given DexFile to look things up as needed.
Inherited from org.droidparts.dexmaker.dx.dex.file.IdItem:
getDefiningClass

Constructor Detail

TypeIdItemback to summary
public TypeIdItem(CstType type)

Constructs an instance.

Parameters
type:CstType

non-null; the constant for the type

Method Detail

addContentsback to summary
public void addContents(DexFile file)

Overrides org.droidparts.dexmaker.dx.dex.file.IdItem.addContents.

Doc from org.droidparts.dexmaker.dx.dex.file.IdItem.addContents.

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

Doc from org.droidparts.dexmaker.dx.dex.file.Item.addContents.

non-null; the file to populate

Annotations
@Override
itemTypeback to summary
public ItemType itemType()

Implements abstract org.droidparts.dexmaker.dx.dex.file.Item.itemType.

Doc from org.droidparts.dexmaker.dx.dex.file.Item.itemType.

Returns the item type for this instance.

Returns:ItemType

non-null; the item type

Annotations
@Override
writeSizeback to summary
public int writeSize()

Implements abstract org.droidparts.dexmaker.dx.dex.file.Item.writeSize.

Doc from org.droidparts.dexmaker.dx.dex.file.Item.writeSize.

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

Returns:int

>= 0; the write size

Annotations
@Override
writeToback to summary
public void writeTo(DexFile file, AnnotatedOutput out)

Implements abstract org.droidparts.dexmaker.dx.dex.file.Item.writeTo.

Doc from org.droidparts.dexmaker.dx.dex.file.Item.writeTo.

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

Annotations
@Override