dex file, as opposed to a random-access form.
| Modifier and Type | Field and Description |
|---|---|
| private final ArrayList | directMethods
|
| private byte[] | encodedForm
|
| private final ArrayList | instanceFields
|
| private final ArrayList | staticFields
|
| private final HashMap | staticValues
|
| private CstArray | staticValuesConstant
|
| private final CstType | thisClass
|
| private final ArrayList | virtualMethods
|
| Access | Constructor and Description |
|---|---|
| public | ClassDataItem(CstType
non-null; what class this data is for, just
for listing generationConstructs an instance. |
| Modifier and Type | Method and Description |
|---|---|
| public void | addContents(DexFile
non-null; the file to populateImplements abstract org. DexFile with items from within this instance.
|
| public void | addDirectMethod(EncodedMethod
non-null; the method to addAdds a direct ( |
| public void | |
| public void | addStaticField(EncodedField
non-null; the field to addnull-ok; initial value for the field, if anyAdds a static field. |
| public void | |
| public void | debugPrint(Writer
non-null; where to output towhether to be verbose with the output verbose)Prints out the contents of this instance, in a debugging-friendly way. |
| private static void | encodeList(DexFile
non-null; file this instance is part ofnon-null; where to write tonon-null; the label for the purposes of annotationnon-null; the list in questionHelper for |
| private void | encodeOutput(DexFile
non-null; file this instance is part ofnon-null; where to write toWrites out the encoded form of this instance. |
| private static void | encodeSize(DexFile
non-null; file this instance is part ofnon-null; where to write tonon-null; the label for the purposes of annotation>= 0; the size to writeHelper for |
| public ArrayList | |
| public CstArray | Returns: null-ok; the corresponding constant or null if
there are no values to encodeGets a |
| public boolean | Returns: true if this instance is empty or
false if at least one element has been added to itReturns whether this instance is empty. |
| public ItemType | itemType()
Implements abstract org. |
| private CstArray | Returns: null-ok; the corresponding constant or null if
there are no values to encodeGets a |
| protected void | place0(Section
non-null; the section this instance has been added to>= 0; the offset from the start of the
section where this instance was placedOverrides org. |
| public String | toHuman()
Implements abstract org. |
| public void | writeTo0(DexFile
non-null; the file to use for referencenon-null; where to write toImplements abstract org. |
| directMethods | back to summary |
|---|---|
| private final ArrayList<EncodedMethod> directMethods
| |
| encodedForm | back to summary |
|---|---|
| private byte[] encodedForm
| |
| instanceFields | back to summary |
|---|---|
| private final ArrayList<EncodedField> instanceFields
| |
| staticFields | back to summary |
|---|---|
| private final ArrayList<EncodedField> staticFields
| |
| staticValues | back to summary |
|---|---|
| private final HashMap<EncodedField, Constant> staticValues
| |
| staticValuesConstant | back to summary |
|---|---|
| private CstArray staticValuesConstant
| |
| thisClass | back to summary |
|---|---|
| private final CstType thisClass
| |
| virtualMethods | back to summary |
|---|---|
| private final ArrayList<EncodedMethod> virtualMethods
| |
| ClassDataItem | back to summary |
|---|---|
| public ClassDataItem(CstType thisClass) Constructs an instance. Its sets of members are initially empty.
| |
| addContents | back to summary |
|---|---|
| public void addContents(DexFile file) Implements abstract org. Doc from org. Populates a Note Subclasses must override this to do something appropriate. | |
| addDirectMethod | back to summary |
|---|---|
| public void addDirectMethod(EncodedMethod method) Adds a direct (
| |
| addInstanceField | back to summary |
|---|---|
| public void addInstanceField(EncodedField field) Adds an instance field.
| |
| addStaticField | back to summary |
|---|---|
| public void addStaticField(EncodedField field, Constant value) Adds a static field.
| |
| addVirtualMethod | back to summary |
|---|---|
| public void addVirtualMethod(EncodedMethod method) Adds a virtual method.
| |
| debugPrint | back to summary |
|---|---|
| public void debugPrint(Writer out, boolean verbose) Prints out the contents of this instance, in a debugging-friendly way.
| |
| encodeList | back to summary |
|---|---|
| private static void encodeList(DexFile file, AnnotatedOutput out, String label, ArrayList<? extends EncodedMember> list) Helper for
| |
| encodeOutput | back to summary |
|---|---|
| private void encodeOutput(DexFile file, AnnotatedOutput out) Writes out the encoded form of this instance.
| |
| encodeSize | back to summary |
|---|---|
| private static void encodeSize(DexFile file, AnnotatedOutput out, String label, int size) Helper for
| |
| getMethods | back to summary |
|---|---|
| public ArrayList Gets all the methods in this class. The returned list is not linked in any way to the underlying lists contained in this instance, but the objects contained in the list are shared.
| |
| getStaticValuesConstant | back to summary |
|---|---|
| public CstArray getStaticValuesConstant() Gets a
| |
| isEmpty | back to summary |
|---|---|
| public boolean isEmpty() Returns whether this instance is empty.
| |
| itemType | back to summary |
|---|---|
| public ItemType itemType() Implements abstract org. Doc from org. Returns the item type for this instance. | |
| makeStaticValuesConstant | back to summary |
|---|---|
| private CstArray makeStaticValuesConstant() Gets a
| |
| place0 | back to summary |
|---|---|
| protected void place0(Section addedTo, int offset) Overrides org. Doc from org. Does additional work required when placing an instance. The default implementation of this method is a no-op. If a particular class needs to do something special, then it should override this method. In particular, if this instance did not know its write size up-front, then this method is responsible for setting it. | |
| toHuman | back to summary |
|---|---|
| public String toHuman() Implements abstract org. Doc from org. Gets a short human-readable string representing this instance. | |
| writeTo0 | back to summary |
|---|---|
| public void writeTo0(DexFile file, AnnotatedOutput out) Implements abstract org. Doc from org. Performs the actual write of the contents of this instance to
the given data section. This is called by
| |