org.apache.myfaces.buildtools.maven2.plugin.javascript.uixtools
Class Reducer
java.lang.Object
org.apache.myfaces.buildtools.maven2.plugin.javascript.uixtools.FileProcessor
org.apache.myfaces.buildtools.maven2.plugin.javascript.uixtools.Reducer
public class Reducer
- extends FileProcessor
Reduces JavaScript files by stripping comments and redundant whitespace
and renaming local variable names to shorter ones.
- Version:
- $Name: $ ($Revision: 606225 $) $Date: 2007-12-21 16:55:00 +0100 (Fr, 21 Dez 2007) $
| Fields inherited from class org.apache.myfaces.buildtools.maven2.plugin.javascript.uixtools.FileProcessor |
isVerbose |
|
Constructor Summary |
Reducer()
|
Reducer(boolean whitespaceComments,
boolean localVars)
creates a new Reducer. |
|
Method Summary |
static void |
main(java.lang.String[] args)
|
void |
process(java.io.BufferedReader in,
java.io.PrintWriter out)
reduces a JavaScript file. |
protected void |
processFile(java.io.File in,
java.io.File out)
Called to process a single file. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Reducer
public Reducer(boolean whitespaceComments,
boolean localVars)
- creates a new Reducer.
- Parameters:
whitespaceComments - if true removes comments and extra whitespacelocalVars - if true renames local variable names to shorter ones.
Reducer
public Reducer()
process
public void process(java.io.BufferedReader in,
java.io.PrintWriter out)
throws java.io.IOException,
java.lang.InterruptedException
- reduces a JavaScript file.
- Parameters:
in - the source to read fromout - the source to write the reduced form to
- Throws:
java.io.IOException
java.lang.InterruptedException
processFile
protected void processFile(java.io.File in,
java.io.File out)
throws java.io.IOException,
java.lang.InterruptedException
- Description copied from class:
FileProcessor
- Called to process a single file.
- Specified by:
processFile in class FileProcessor
- Parameters:
in - the input file. This is never a directory.out - the output file. If this file exists and overwriting is not
permitted, then this method is never called.
- Throws:
java.io.IOException
java.lang.InterruptedException- See Also:
FileProcessor.processFile(File, File)
main
public static void main(java.lang.String[] args)
Copyright © 2001-2009 Apache Software Foundation. All Rights Reserved.