|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface JSCompressor
Abstraction of a JS compression tool.
Field Summary | |
---|---|
static int |
JAVASCRIPT_1_1
Javascript language versions |
static int |
JAVASCRIPT_1_2
|
static int |
JAVASCRIPT_1_3
|
static int |
MAX
|
static int |
NONE
Constants for optimization level |
Method Summary | |
---|---|
void |
compress(java.io.File input,
java.io.File output,
int level,
int language)
Compress the input script file into the output file (may be same). |
JSCompressorLogger |
getLogger()
Return current JSCompressorLogger used for logging |
void |
setLogger(JSCompressorLogger logger)
Set a the JSCompressorLogger implementation that will receive logs |
Field Detail |
---|
static final int NONE
static final int MAX
static final int JAVASCRIPT_1_1
static final int JAVASCRIPT_1_2
static final int JAVASCRIPT_1_3
Method Detail |
---|
void setLogger(JSCompressorLogger logger) throws CompressionException
logger
- a logger
CompressionException
JSCompressorLogger getLogger() throws CompressionException
CompressionException
void compress(java.io.File input, java.io.File output, int level, int language) throws CompressionException
input
- source to get compressedoutput
- compressed scriptlevel
- optimization level from 0 to 9. May have various
signification dependending on the compressor, from beeing ignored to some
fine tweaking the output.language
- version of javascript to be used ("130" for JS 1.3), as
defined by Mozilla Rhino engine
CompressionException
- any error during compression
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |