|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.sun.billf.tass.AddToTassDatabase
This little main uses the TASS classes to create and/or add to a database of member usage. It first attempts to read the named TASS database, which by convention should end in ".tdb". If the file does not exist, a new, empty database will be created. Then, a .zip file containing application classes is read, and static references from the application to platform classes are calculated. Every .class file contained withing the .zip archive is read; no attempt is made to discover unused application classes or methods. Finally, an updated database is written, with the record of referenes for each platform member updated.
Each run of AddToTassDatabase is tracked with an integer ID number, assigned sequentially. This allows the party that runs TASS to anonymously track back to the application that contains a given reference or pattern of references.
See the usage message for details on command-line arguments.
Constructor Summary | |
AddToTassDatabase(TassDatabase db)
|
Method Summary | |
boolean |
addClassFile(java.lang.String fileName)
|
boolean |
addZipFile(java.lang.String fileName)
Add the .class files in the given archive. |
void |
checkFieldRef(java.lang.String className,
java.lang.String fieldName)
Internal Visitee implementation method |
void |
checkForClass(java.lang.String name)
Internal Visitee implementation method |
void |
checkMethodRef(java.lang.String className,
java.lang.String methodName,
org.apache.bcel.generic.Type[] args)
Internal Visitee implementation method |
void |
checkType(org.apache.bcel.generic.Type t)
Internal Visitee implementation method |
int |
getTrackingNumber()
|
void |
init(java.lang.String[] packages)
This must only be called after the database is initialized |
static void |
main(java.lang.String[] args)
|
void |
reportError(java.lang.String msg)
Internal Visitee implementation method |
static void |
usage()
Print a usage message describing the command-line arguments. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public AddToTassDatabase(TassDatabase db)
Method Detail |
public static void usage()
public int getTrackingNumber()
public void init(java.lang.String[] packages) throws java.io.IOException
java.io.IOException
public boolean addZipFile(java.lang.String fileName) throws java.io.IOException
fileName
- The name of the zip archive containing
.class files
java.io.IOException
public boolean addClassFile(java.lang.String fileName) throws java.io.IOException
java.io.IOException
public void checkForClass(java.lang.String name)
checkForClass
in interface com.sun.billf.tass.Visitee
public void checkType(org.apache.bcel.generic.Type t)
checkType
in interface com.sun.billf.tass.Visitee
Visitee.checkForClass(String)
public void reportError(java.lang.String msg)
reportError
in interface com.sun.billf.tass.Visitee
public void checkFieldRef(java.lang.String className, java.lang.String fieldName)
checkFieldRef
in interface com.sun.billf.tass.Visitee
public void checkMethodRef(java.lang.String className, java.lang.String methodName, org.apache.bcel.generic.Type[] args)
checkMethodRef
in interface com.sun.billf.tass.Visitee
public static void main(java.lang.String[] args)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |