|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.curjent.test.agent.asmify.GenerateAsm
public class GenerateAsm
Generates and formats the ASM test files.
Field Summary | |
---|---|
private static String |
ASM_CLASS_SUFFIX
Suffix used for asmified classes. |
private static Pattern |
ASM_FILENAME_PATTERN
Pattern for matching asmified file names. |
private static String |
ASM_JAR_FILE
Project's ASM JAR file. |
private static String |
ASMIFY_DIR
Project's directory for the asmified files. |
private static String |
CLASS_FILE_DIR
Project's output directory for compiled class files. |
private static String |
CLASSPATH_SEPARATOR
Separator for directory and JAR paths in CLASSPATH. |
private static String |
PATH_SEPARATOR
Separator for directory and file names in file system paths. |
private static int |
PROJECT_ROOT
Argument index for the project root. |
private static Pattern |
SOURCE_FILENAME_PATTERN
Pattern for matching source file names to asmify. |
Constructor Summary | |
---|---|
GenerateAsm()
|
Method Summary | |
---|---|
private File |
asmFile(File sourceFile)
Returns the Asm file name for a source file. |
private List<String> |
asmify(String className,
String classpath)
Asmify the given file. |
private String |
className(File sourceFile)
Returns the corresponding class name of a source file. |
private String |
classpath(File projectRoot)
Returns the CLASSPATH for running the asmifier. |
(package private) void |
exit()
Exits the JVM with a -1 error code |
private void |
fixup(List<String> lines)
Fixes package names and other problems with the asmified output lines. |
private void |
format(List<String> lines)
Formats the asmified output lines. |
(package private) void |
log(Object o)
Prints the object to stdout. |
static void |
main(String[] args)
Command line entry point. |
private void |
run(String[] args)
Evaluates and saves the command line arguments |
private void |
write(File asmFile,
List<String> lines)
Writes the Asm file. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
private static final int PROJECT_ROOT
private static final String ASMIFY_DIR
private static final String CLASS_FILE_DIR
private static final String ASM_JAR_FILE
private static final Pattern SOURCE_FILENAME_PATTERN
private static final String ASM_CLASS_SUFFIX
private static final Pattern ASM_FILENAME_PATTERN
private static final String CLASSPATH_SEPARATOR
private static final String PATH_SEPARATOR
Constructor Detail |
---|
public GenerateAsm()
Method Detail |
---|
private void run(String[] args) throws Throwable
Throwable
private String classpath(File projectRoot) throws Throwable
Throwable
private String className(File sourceFile)
private File asmFile(File sourceFile)
private List<String> asmify(String className, String classpath) throws Throwable
Throwable
private void fixup(List<String> lines)
private void format(List<String> lines)
private void write(File asmFile, List<String> lines) throws Throwable
Throwable
void log(Object o)
void exit()
public static void main(String[] args) throws Throwable
args
- args[0]
- project's root directory
Throwable
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |