Interface ICompiler
IJavaComponent) compiler extension interface.
 
 This interface is implemented by implementation of components of type com.zfabrik.compiler.
 
Supported configuration properties:
- compiler.id
- An identifier for the compiler to be used when defining the compile order
 of a Java component using the java.compile.orderproperty on the Java component.
 Compiler extensions operate over a build result folder (usually .class files and other binary resources)
 that will be JARred at when all compilers have completed. Compilers will be passed a class path in the 
 form of a class loader. When required, the actual files and folders of the classpath can be retrieved
 by casting that class loader to URLClassLoader and invoking URLClassLoader.getURLs().
 
 Compilers are invoked in order of the specified java.compile.order (see IJavaComponent.COMPILE_ORDER). When 
 declaring a compiler, a compiler.id must be specified that is used to reference
 the compiler when specifying the compiler order.
 
An example compiler component declaration looks like this:
# # it's a compiler # com.zfabrik.component.type=com.zfabrik.java.compiler # # it's feature_x_compiler # compiler.id=feature_x_compiler # # it's implemented here # component.className=com.acme.impl.FeatureXCompiler
- Author:
- hb
- 
Field SummaryFields
- 
Method SummaryModifier and TypeMethodDescriptiondefault ICompilerALL()Retrieve the "all" compiler, that uses the compile order to decide on what more specific compilers to usedefault booleancompile(ICompilationContext compilationContext) A general purpose compiler api using a class loader as class path abstraction.default booleancompile(String compName, File[] src, File dest, ClassLoader cl) Deprecated.default voidinit(ICompilerContext context) Compiler initialization
- 
Field Details- 
TYPECompilers must define this type- See Also:
 
- 
COMPILER_IDThe compiler ID must be defined in the compiler component - e.g.javaorscala- See Also:
 
 
- 
- 
Method Details- 
ALLRetrieve the "all" compiler, that uses the compile order to decide on what more specific compilers to use- Returns:
 
- 
compileDeprecated.Implementcompile(ICompilationContext)instead.A general purpose compiler api using a class loader as class path abstraction. Returns true if the compilation passed otherwise it returns false.- Parameters:
- compName- the name of the component
- src- folder containing the source files
- dest- destination folder will contain compile results
- cl- class loader as class path abstraction
- Returns:
- true, iff compilation succeeds
 
- 
compileA general purpose compiler api using a class loader as class path abstraction. Returns true if the compilation passed otherwise it returnsfalse. This method to be implemented for part specific handling. It defaults to invocation ofcompile(String, File[], File, ClassLoader).- Parameters:
- compName- the name of the component
- src- folder containing the source files
- dest- destination folder will contain compile results
- cl- class loader as class path abstraction
- part- of the component to compile
- Returns:
- true, iff compilation succeeds
 
- 
initCompiler initialization
 
- 
compile(ICompilationContext)instead.