|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object js.tinyvm.Binary
public class Binary
Abstraction for dumped binary.
Constructor Summary | |
---|---|
Binary(boolean useAll)
Constructor. |
Method Summary | |
---|---|
protected void |
addClassRecord(java.lang.String className,
ClassRecord classRecord)
Add a class. |
static Binary |
createFromClosureOf(java.lang.String[] entryClassNames,
ClassPath classPath,
boolean all)
Create closure. |
void |
dump(IByteWriter writer)
Dump. |
void |
dumpDebug(java.io.OutputStream fos)
Dump debug data. |
int |
getClassIndex(ClassRecord classRecord)
Get index of class in binary by its class record. |
int |
getClassIndex(java.lang.String className)
Get index of class in binary by its signature. |
ClassRecord |
getClassRecord(java.lang.String className)
Get class record with given signature. |
ClassRecord |
getClassRecordForArray(ClassRecord elementClass)
Return the class the represents an array of the given type and dimension. |
int |
getConstantIndex(ConstantRecord constantRecord)
Get index of constant in binary by its constant record. |
ConstantRecord |
getConstantRecord(int index)
Get constant record with given index. |
int |
getGeneration()
Return the current marking generation. |
int |
getTotalNumExceptionRecords()
|
int |
getTotalNumInstanceFields()
|
int |
getTotalNumMethods()
|
boolean |
hasMain(java.lang.String className)
Has class in binary a public static void main (String[] args) method? |
void |
initOffsets()
|
boolean |
isSpecialSignature(Signature aSig)
|
void |
log(ToolProgressMonitor monitor)
|
void |
markClassUsed(ClassRecord classRecord,
boolean instance)
Mark the given class as actually used. |
void |
markUsed(java.lang.String[] entryClassNames)
|
void |
printInterfaces()
|
void |
processClasses(java.lang.String[] entryClassNames,
ClassPath classPath)
|
void |
processCode(boolean aPostProcess)
|
void |
processConstants()
|
void |
processFields()
|
void |
processMethods()
Calls storeMethods on all the classes of the closure previously computed with processClasses. |
void |
processOptimizedClasses()
Optimize the number and order of classes. |
void |
processOptimizedConstants()
Store constant values in an optimal fashion. |
void |
processOptimizedFields()
|
void |
processOptimizedMethods()
|
void |
processSpecialSignatures()
|
void |
setRunTimeOptions(int opt)
|
void |
storeComponents()
|
boolean |
useAll()
Return true if unused methods/classes etc. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public Binary(boolean useAll)
useAll
- true if all classes/methods etc. should be includedMethod Detail |
---|
public void dump(IByteWriter writer) throws TinyVMException
writer
-
TinyVMException
public void dumpDebug(java.io.OutputStream fos) throws java.io.IOException
fos
- FileOutputStream
java.io.IOException
protected void addClassRecord(java.lang.String className, ClassRecord classRecord)
className
- class name with '/'classRecord
- public boolean hasMain(java.lang.String className)
className
- class name with '/'
public ClassRecord getClassRecord(java.lang.String className)
className
- class name with '/'
public ClassRecord getClassRecordForArray(ClassRecord elementClass) throws TinyVMException
elementClass
-
TinyVMException
public int getClassIndex(java.lang.String className)
className
- class name with '/'
public int getClassIndex(ClassRecord classRecord)
classRecord
-
public void markClassUsed(ClassRecord classRecord, boolean instance)
classRecord
- the class to be markedinstance
- public int getGeneration()
public ConstantRecord getConstantRecord(int index)
index
-
public int getConstantIndex(ConstantRecord constantRecord)
constantRecord
-
public boolean useAll()
public static Binary createFromClosureOf(java.lang.String[] entryClassNames, ClassPath classPath, boolean all) throws TinyVMException
entryClassNames
- names of entry class with '/'classPath
- class pathall
- do not filter classes?
TinyVMException
public void processClasses(java.lang.String[] entryClassNames, ClassPath classPath) throws TinyVMException
TinyVMException
public void processOptimizedClasses() throws TinyVMException
TinyVMException
public void markUsed(java.lang.String[] entryClassNames) throws TinyVMException
TinyVMException
public void processSpecialSignatures()
public boolean isSpecialSignature(Signature aSig)
public void processConstants() throws TinyVMException
TinyVMException
public void processOptimizedConstants() throws TinyVMException
TinyVMException
public void processMethods() throws TinyVMException
TinyVMException
public void processOptimizedMethods() throws TinyVMException
TinyVMException
public void processFields() throws TinyVMException
TinyVMException
public void printInterfaces() throws TinyVMException
TinyVMException
public void processOptimizedFields() throws TinyVMException
TinyVMException
public void processCode(boolean aPostProcess) throws TinyVMException
TinyVMException
public void storeComponents()
public void initOffsets() throws TinyVMException
TinyVMException
public void setRunTimeOptions(int opt)
public int getTotalNumMethods()
public int getTotalNumInstanceFields()
public int getTotalNumExceptionRecords()
public void log(ToolProgressMonitor monitor) throws TinyVMException
TinyVMException
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |