Compiler
defines a generic compiler.
-
Method Summary
void
Compiles a given collection of resources.
Returns the mime type of the output file.
Returns the extension of the output file
boolean
Checks if this compiler handles the file with the given extension
-
Method Details
-
getName
Name of this compiler.
- Returns:
- the name
-
handles
boolean handles(String extension)
Checks if this compiler handles the file with the given extension
- Parameters:
extension
- extension, eg 'less'
- Returns:
true
if this compiler handles the extension
-
getMimeType
Returns the mime type of the output file.
- Returns:
- the mime type.
-
getOutputExtension
Returns the extension of the output file
- Returns:
- the extension of the output file. eg. 'css'
-
compile
Compiles a given collection of resources.
- Parameters:
src
- resource to compile
dst
- writer to write the compiled output
ctx
- the compiler context
- Throws:
IOException
- of an I/O error occurs