|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.codehaus.aspectwerkz.compiler.AspectWerkzC
AspectWerkzC allow for precompilation of class / jar / zip given a class preprocessor.
java [-Daspectwerkz.classloader.preprocessor={ClassPreProcessorImpl}] -cp [...] org.codehaus.aspectwerkz.compiler.AspectWerkzC [-verbose] [-haltOnError] [-verify] [-cp {additional cp i}]* {target 1} .. {target n} {ClassPreProcessorImpl} : full qualified name of the ClassPreProcessor implementation (must be in classpath) defaults to org.codehaus.aspectwerkz.transform.AspectWerkzPreProcessor {additional cp i} : additionnal classpath needed at compile time (eg: myaspect.jar) use as many -cp options as needed supports java classpath syntax for classpath separator: ; on windows, : on others {target i} : exploded dir, jar, zip files to compile Ant 1.5 must be in the classpath
Constructor Summary | |
AspectWerkzC()
Construct a new Utility, restore the index for backup |
Method Summary | |
void |
backup(File source,
int index)
Backup source file in backup_dir/index/file. |
static void |
compile(AspectWerkzC compiler,
ClassLoader classLoader,
String preProcessor,
List classpath,
List targets)
Runs the AspectWerkzC compiler for the targets files. |
boolean |
compile(File source)
Compile given target. |
void |
compileClass(File file,
String packaging)
Compiles .class file using fileName as className and given packaging as package name |
void |
compileJar(File file)
Compile all .class encountered in the .jar/.zip file. |
void |
doCompile(File sourceFile,
String prefixPackage)
Compile sourceFile. |
static void |
doHelp()
Usage message |
Utility |
getUtility()
|
static boolean |
isJarFile(File source)
Test if file is a zip/jar file |
static void |
main(String[] args)
|
void |
postCompile(String message)
Delete backup dir at the end of all compilation |
void |
restoreBackup()
Restore the backup registered |
void |
setBackupDir(String backup)
|
void |
setCompilationPath(File[] targets,
ClassLoader parentLoader)
Set up the compilation path by building a URLClassLoader with all targets in |
void |
setHaltOnError(boolean haltOnError)
|
void |
setPreprocessor(String preprocessor)
Sets the ClassPreProcessor implementation to use. |
void |
setVerbose(boolean verbose)
|
void |
setVerify(boolean verify)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public AspectWerkzC()
Method Detail |
public void setVerbose(boolean verbose)
public void setHaltOnError(boolean haltOnError)
public void setVerify(boolean verify)
public void setBackupDir(String backup)
public Utility getUtility()
public void setPreprocessor(String preprocessor) throws CompileException
CompileException
public void backup(File source, int index)
public void restoreBackup()
public void postCompile(String message)
public void doCompile(File sourceFile, String prefixPackage) throws CompileException
CompileException
public void compileClass(File file, String packaging) throws CompileException
CompileException
public void compileJar(File file) throws CompileException
CompileException
public boolean compile(File source)
public void setCompilationPath(File[] targets, ClassLoader parentLoader)
targets
- to add to compilationLoader classpathparentLoader
- the parent ClassLoader used by the new onepublic static boolean isJarFile(File source)
public static void doHelp()
public static void compile(AspectWerkzC compiler, ClassLoader classLoader, String preProcessor, List classpath, List targets)
compiler
- a configured AspectWerkzC
classLoader
- the class loader to be usedpreProcessor
- fully qualified name of the preprocessor class.
If null than the default is used
(org.codehaus.aspectwerkz.transform.AspectWerkzPreProcessor
)classpath
- list of Files representing the classpath (Listtargets
- the list of target files (Listpublic static void main(String[] args)
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |