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 (Fri, 21 Dec 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. |
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(BufferedReader in,
PrintWriter out)
throws IOException,
InterruptedException
- reduces a JavaScript file.
- Parameters:
in
- the source to read fromout
- the source to write the reduced form to
- Throws:
IOException
InterruptedException
processFile
protected void processFile(File in,
File out)
throws IOException,
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:
IOException
InterruptedException
- See Also:
FileProcessor.processFile(File, File)
main
public static void main(String[] args)
Copyright © 2001-2013 The Apache Software Foundation. All Rights Reserved.