Class DefaultCommandLineCompiler
java.lang.Object
com.google.common.css.AbstractCommandLineCompiler<JobDescription>
com.google.common.css.compiler.commandline.DefaultCommandLineCompiler
- Direct Known Subclasses:
ClosureCommandLineCompiler,ClosureStylesheetCompiler
DefaultCommandLineCompiler provides the CSS parser from command line interface to users.-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionprotected static final classAn error message handler. -
Field Summary
FieldsModifier and TypeFieldDescriptionprotected static final intThe compiler will limit the number of error messages it outputs to this number.Fields inherited from class com.google.common.css.AbstractCommandLineCompiler
compilerWasUsed, ERROR_MESSAGE_EXIT_CODE, exitCodeHandler, INTERNAL_ERROR_EXIT_CODE, job, SUCCESS_EXIT_CODE, UNHANDLED_EXCEPTION_EXIT_CODE -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedDefaultCommandLineCompiler(JobDescription job, ExitCodeHandler exitCodeHandler, ErrorManager errorManager) Constructs aDefaultCommandLineCompiler. -
Method Summary
Modifier and TypeMethodDescriptioncompile()Parses all the inputs, reports error messages and combines the parsed inputs into one stylesheet.protected StringExecutes the job associated with this compiler and returns the compiled CSS as a string.protected voidwriteRenamingMap(Map<String, String> renamingMap, PrintWriter renamingMapWriter) Writes the mappings to the specified writer.Methods inherited from class com.google.common.css.AbstractCommandLineCompiler
exitOnUnhandledException
-
Field Details
-
MAXIMUM_ERRORS_TO_OUTPUT
protected static final int MAXIMUM_ERRORS_TO_OUTPUTThe compiler will limit the number of error messages it outputs to this number.- See Also:
-
-
Constructor Details
-
DefaultCommandLineCompiler
protected DefaultCommandLineCompiler(JobDescription job, ExitCodeHandler exitCodeHandler, ErrorManager errorManager) Constructs aDefaultCommandLineCompiler.- Parameters:
job- The inputs the compiler should process and the options to use.errorManager- The error manager to use for error reporting.
-
-
Method Details
-
compile
Parses all the inputs, reports error messages and combines the parsed inputs into one stylesheet.- Returns:
- the resulting stylesheet in string format
- Throws:
GssParserException
-
execute
Executes the job associated with this compiler and returns the compiled CSS as a string. IfrenameFileis specified along with aRecordingSubstitutionMap, then the renaming file will be written, as well. -
writeRenamingMap
Writes the mappings to the specified writer. By default, mappings are written (one per line) as:key:value
Subclasses may override this method to provide alternate output formats. Subclasses must not close the writer.
-