public final class StringIdsSection extends UniformItemSection
.dex file.| Constructor and Description |
|---|
StringIdsSection(DexFile file)
Constructs an instance.
|
| Modifier and Type | Method and Description |
|---|---|
IndexedItem |
get(Constant cst)
Gets the item corresponding to the given
Constant. |
int |
indexOf(CstString string)
Gets the index of the given string, which must have been added
to this instance.
|
void |
intern(CstNat nat)
Interns the components of a name-and-type into this instance.
|
StringIdItem |
intern(CstString string)
Interns an element into this instance.
|
StringIdItem |
intern(java.lang.String string)
Interns an element into this instance.
|
StringIdItem |
intern(StringIdItem string)
Interns an element into this instance.
|
java.util.Collection<? extends Item> |
items()
Gets the collection of all the items in this section.
|
protected 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. |
void |
writeHeaderPart(AnnotatedOutput out)
Writes the portion of the file header that refers to this instance.
|
getAbsoluteItemOffset, prepare0, writeSize, writeTo0align, getAbsoluteOffset, getAlignment, getFile, getFileOffset, getName, prepare, setFileOffset, throwIfNotPrepared, throwIfPrepared, validateAlignment, writeTopublic StringIdsSection(DexFile file)
file - non-null; file that this instance is part ofpublic java.util.Collection<? extends Item> items()
public 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.get in class UniformItemSectioncst - non-null; constant to look fornon-null; the corresponding item found in this instancepublic void writeHeaderPart(AnnotatedOutput out)
out - non-null; where to writepublic StringIdItem intern(java.lang.String string)
string - non-null; the string to intern, as a regular Java
Stringnon-null; the interned stringpublic StringIdItem intern(CstString string)
string - non-null; the string to intern, as a constantnon-null; the interned stringpublic StringIdItem intern(StringIdItem string)
string - non-null; the string to internnon-null; the interned stringpublic void intern(CstNat nat)
nat - non-null; the name-and-typepublic int indexOf(CstString string)
string - non-null; the string to look up>= 0; the string's indexprotected 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.orderItems in class UniformItemSectionCopyright © 2020. All Rights Reserved.