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

public abstract Class MemberIdItem

extends IdItem
Class Inheritance
Known Direct Subclasses
org.droidparts.dexmaker.dx.dex.file.MethodIdItem, org.droidparts.dexmaker.dx.dex.file.FieldIdItem
Imports
org.droidparts.dexmaker.dx.dex.SizeOf, org.droidparts.dexmaker.dx.rop.cst.CstMemberRef, .CstNat, org.droidparts.dexmaker.dx.util.AnnotatedOutput, .Hex

Representation of a member (field or method) reference inside a Dalvik file.

Field Summary

Modifier and TypeField and Description
private final CstMemberRef
cst

non-null; the constant for the member

Constructor Summary

AccessConstructor and Description
public
MemberIdItem(CstMemberRef
non-null; the constant for the member
cst
)

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 final CstMemberRef

Returns:

non-null; the constant
getRef
()

Gets the member constant.

protected abstract int

Returns:

the index in question
getTypoidIdx
(DexFile
non-null; the file being written
file
)

Returns the index of the type-like thing associated with this item, in order that it may be written out.

protected abstract String

Returns:

non-null; the name in question
getTypoidName
()

Returns the field name of the type-like thing associated with this item, for listing-generating purposes.

public int
writeSize()

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

Gets the size of this instance when written, in bytes.
public final 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

Field Detail

cstback to summary
private final CstMemberRef cst

non-null; the constant for the member

Constructor Detail

MemberIdItemback to summary
public MemberIdItem(CstMemberRef cst)

Constructs an instance.

Parameters
cst:CstMemberRef

non-null; the constant for the member

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
getRefback to summary
public final CstMemberRef getRef()

Gets the member constant.

Returns:CstMemberRef

non-null; the constant

getTypoidIdxback to summary
protected abstract int getTypoidIdx(DexFile file)

Returns the index of the type-like thing associated with this item, in order that it may be written out. Subclasses must override this to get whatever it is they need to store.

Parameters
file:DexFile

non-null; the file being written

Returns:int

the index in question

getTypoidNameback to summary
protected abstract String getTypoidName()

Returns the field name of the type-like thing associated with this item, for listing-generating purposes. Subclasses must override this.

Returns:String

non-null; the name in question

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 final 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