Interface ScriptProcessor
-
- All Known Subinterfaces:
ScriptTransformer
@ConsumerType public interface ScriptProcessor
ScriptProcessor
processes a script by minifying, obfuscating etc.
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.String
FEATURE_MINIFY
Name of the minify feature.
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description java.lang.String
getName()
Name of this processor.boolean
handles(LibraryType type)
Checks if this processor can handle the give library type.boolean
process(LibraryType type, ScriptResource source, java.io.Writer output, java.util.Map<java.lang.String,java.lang.String> options)
Processes the given input using the options.
-
-
-
Field Detail
-
FEATURE_MINIFY
static final java.lang.String FEATURE_MINIFY
Name of the minify feature.- See Also:
- Constant Field Values
-
-
Method Detail
-
getName
@Nonnull java.lang.String getName()
Name of this processor.- Returns:
- the name
-
handles
boolean handles(@Nonnull LibraryType type)
Checks if this processor can handle the give library type. handles the file with the given extension- Parameters:
type
- the type- Returns:
true
if this processor handles the type
-
process
boolean process(@Nonnull LibraryType type, @Nonnull ScriptResource source, @Nonnull java.io.Writer output, @Nonnull java.util.Map<java.lang.String,java.lang.String> options) throws java.io.IOException
Processes the given input using the options.- Parameters:
type
- the library type to processsource
- input sourceoutput
- output writeroptions
- processing options.- Returns:
true
if the sources were processed- Throws:
java.io.IOException
- if an I/O error occurs
-
-