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

public final Class ProtoIdItem

extends IndexedItem
Class Inheritance
Imports
org.droidparts.dexmaker.dx.dex.SizeOf, org.droidparts.dexmaker.dx.rop.cst.CstString, org.droidparts.dexmaker.dx.rop.type.Prototype, .StdTypeList, .Type, org.droidparts.dexmaker.dx.util.AnnotatedOutput, .Hex

Representation of a method prototype reference inside a Dalvik file.

Field Summary

Modifier and TypeField and Description
private TypeListItem
parameterTypes

null-ok; the list of parameter types or null if this prototype has no parameters

private final Prototype
prototype

non-null; the wrapped prototype

private final CstString
shortForm

non-null; the short-form of the prototype

Constructor Summary

AccessConstructor and Description
public
ProtoIdItem(Prototype
non-null; the constant for the prototype
prototype
)

Constructs an instance.

Method Summary

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

Implements abstract org.droidparts.dexmaker.dx.dex.file.Item.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.
private static CstString

Returns:

non-null; the short form
makeShortForm
(Prototype
non-null; the prototype
prototype
)

Creates the short-form of the given prototype.

private static char

Returns:

the corresponding short-form character
shortFormCharFor
(Type
non-null; the type
type
)

Gets the short-form character for the given type.

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.IndexedItem:
getIndexhasIndexindexStringsetIndex

Field Detail

parameterTypesback to summary
private TypeListItem parameterTypes

null-ok; the list of parameter types or null if this prototype has no parameters

prototypeback to summary
private final Prototype prototype

non-null; the wrapped prototype

shortFormback to summary
private final CstString shortForm

non-null; the short-form of the prototype

Constructor Detail

ProtoIdItemback to summary
public ProtoIdItem(Prototype prototype)

Constructs an instance.

Parameters
prototype:Prototype

non-null; the constant for the prototype

Method Detail

addContentsback to summary
public void addContents(DexFile file)

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

Doc from org.droidparts.dexmaker.dx.dex.file.Item.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

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
makeShortFormback to summary
private static CstString makeShortForm(Prototype prototype)

Creates the short-form of the given prototype.

Parameters
prototype:Prototype

non-null; the prototype

Returns:CstString

non-null; the short form

shortFormCharForback to summary
private static char shortFormCharFor(Type type)

Gets the short-form character for the given type.

Parameters
type:Type

non-null; the type

Returns:char

the corresponding short-form character

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