|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.android.dx.dex.file.DexFile
public final class DexFile
Representation of an entire .dex (Dalvik EXecutable)
file, which itself consists of a set of Dalvik classes.
| Constructor Summary | |
|---|---|
DexFile(DexOptions dexOptions)
Constructs an instance. |
|
| Method Summary | |
|---|---|
void |
add(ClassDefItem clazz)
Adds a class to this instance. |
ClassDefItem |
getClassOrNull(String name)
Gets the class definition with the given name, if any. |
DexOptions |
getDexOptions()
Gets the dex-creation options object. |
Statistics |
getStatistics()
Generates and returns statistics for all the items in the file. |
boolean |
isEmpty()
Returns true if this dex doesn't contain any class defs. |
void |
setDumpWidth(int dumpWidth)
Sets the maximum width of the human-oriented dump of the instance. |
byte[] |
toDex(Writer humanOut,
boolean verbose)
Returns the contents of this instance as a .dex file,
in byte[] form. |
void |
writeTo(OutputStream out,
Writer humanOut,
boolean verbose)
Writes the contents of this instance as either a binary or a human-readable form, or both. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public DexFile(DexOptions dexOptions)
| Method Detail |
|---|
public boolean isEmpty()
public DexOptions getDexOptions()
public void add(ClassDefItem clazz)
clazz - non-null; the class to addpublic ClassDefItem getClassOrNull(String name)
name - non-null; the class name to look for
null-ok; the class with the given name, or null
if there is no such class
public void writeTo(OutputStream out,
Writer humanOut,
boolean verbose)
throws IOException
out - null-ok; where to write tohumanOut - null-ok; where to write human-oriented output toverbose - whether to be verbose when writing human-oriented output
IOException
public byte[] toDex(Writer humanOut,
boolean verbose)
throws IOException
.dex file,
in byte[] form.
humanOut - null-ok; where to write human-oriented output toverbose - whether to be verbose when writing human-oriented output
non-null; a .dex file for this instance
IOExceptionpublic void setDumpWidth(int dumpWidth)
dumpWidth - >= 40; the widthpublic Statistics getStatistics()
non-null; the statistics
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||