|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.android.dx.dex.file.ValueEncoder
public final class ValueEncoder
Handler for writing out encoded_values and parts
thereof.
| Constructor Summary | |
|---|---|
ValueEncoder(DexFile file,
AnnotatedOutput out)
Construct an instance. |
|
| Method Summary | |
|---|---|
static void |
addContents(DexFile file,
Annotation annotation)
Helper for addContents() methods, which adds
contents for a particular Annotation, calling itself
recursively should it encounter a nested annotation. |
static void |
addContents(DexFile file,
Constant cst)
Helper for addContents() methods, which adds
contents for a particular constant, calling itself recursively
should it encounter a CstArray and calling addContents(DexFile,Annotation) recursively should it
encounter a CstAnnotation. |
static String |
constantToHuman(Constant cst)
Gets the colloquial type name and human form of the type of the given constant, when used as an encoded value. |
void |
writeAnnotation(Annotation annotation,
boolean topLevel)
Writes out the encoded form of the given annotation, that is, as an encoded_annotation and not including a
value_type prefix. |
void |
writeArray(CstArray array,
boolean topLevel)
Writes out the encoded form of the given array, that is, as an encoded_array and not including a
value_type prefix. |
void |
writeConstant(Constant cst)
Writes out the encoded form of the given constant. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public ValueEncoder(DexFile file,
AnnotatedOutput out)
file - non-null; file being writtenout - non-null; output stream to write to| Method Detail |
|---|
public void writeConstant(Constant cst)
cst - non-null; the constant to write
public void writeArray(CstArray array,
boolean topLevel)
encoded_array and not including a
value_type prefix. If the output stream keeps
(debugging) annotations and topLevel is
true, then this method will write (debugging)
annotations.
array - non-null; array instance to writetopLevel - true iff the given annotation is the
top-level annotation or false if it is a sub-annotation
of some other annotation
public void writeAnnotation(Annotation annotation,
boolean topLevel)
encoded_annotation and not including a
value_type prefix. If the output stream keeps
(debugging) annotations and topLevel is
true, then this method will write (debugging)
annotations.
annotation - non-null; annotation instance to writetopLevel - true iff the given annotation is the
top-level annotation or false if it is a sub-annotation
of some other annotationpublic static String constantToHuman(Constant cst)
cst - non-null; the constant
non-null; its type name and human form
public static void addContents(DexFile file,
Annotation annotation)
addContents() methods, which adds
contents for a particular Annotation, calling itself
recursively should it encounter a nested annotation.
file - non-null; the file to add toannotation - non-null; the annotation to add contents for
public static void addContents(DexFile file,
Constant cst)
addContents() methods, which adds
contents for a particular constant, calling itself recursively
should it encounter a CstArray and calling addContents(DexFile,Annotation) recursively should it
encounter a CstAnnotation.
file - non-null; the file to add tocst - non-null; the constant to add contents for
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||