|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.android.dx.dex.file.Section
com.android.dx.dex.file.UniformItemSection
public abstract class UniformItemSection
A section of a .dex file which consists of a sequence of
Item objects. Each of the items must have the same size in
the output.
| Constructor Summary | |
|---|---|
UniformItemSection(String name,
DexFile file,
int alignment)
Constructs an instance. |
|
| Method Summary | |
|---|---|
abstract IndexedItem |
get(Constant cst)
Gets the item corresponding to the given Constant. |
int |
getAbsoluteItemOffset(Item item)
Returns the absolute file offset of the given item which must be contained in this section. |
protected abstract void |
orderItems()
Alters or picks the order for items in this instance if desired, so that subsequent calls to Section.items() will yield a
so-ordered collection. |
protected void |
prepare0()
Does the main work of Section.prepare(). |
int |
writeSize()
Gets the size of this instance when output, in bytes. |
protected void |
writeTo0(AnnotatedOutput out)
Writes this instance to the given raw data object. |
| Methods inherited from class com.android.dx.dex.file.Section |
|---|
align, getAbsoluteOffset, getAlignment, getFile, getFileOffset, getName, items, prepare, setFileOffset, throwIfNotPrepared, throwIfPrepared, validateAlignment, writeTo |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public UniformItemSection(String name,
DexFile file,
int alignment)
name - null-ok; the name of this instance, for annotation
purposesfile - non-null; file that this instance is part ofalignment - > 0; alignment requirement for the final output;
must be a power of 2| Method Detail |
|---|
public final int writeSize()
writeSize in class Section>= 0; the size of this instance, in bytespublic abstract IndexedItem get(Constant cst)
Constant. This
will throw an exception if the constant is not found, including
if this instance isn't the sort that maps constants to IndexedItem instances.
cst - non-null; constant to look for
non-null; the corresponding item found in this instanceprotected final void prepare0()
Section.prepare().
prepare0 in class Sectionprotected final void writeTo0(AnnotatedOutput out)
Section.writeTo(com.android.dx.util.AnnotatedOutput) after aligning the cursor of
out and verifying that either the assigned file
offset matches the actual cursor out or that the
file offset was not previously assigned, in which case it gets
assigned to out's cursor.
writeTo0 in class Sectionout - non-null; where to write topublic final int getAbsoluteItemOffset(Item item)
Section.setFileOffset(int)).
Note: Subclasses must implement this as appropriate for their contents.
getAbsoluteItemOffset in class Sectionitem - non-null; the item in question
>= 0; the item's absolute file offsetprotected abstract void orderItems()
Section.items() will yield a
so-ordered collection. If the items in this instance are indexed,
then this method should also assign indices.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||