ro.isdc.wro.extensions.processor.js
Class BeautifyJsProcessor

java.lang.Object
  extended by ro.isdc.wro.extensions.processor.js.BeautifyJsProcessor
All Implemented Interfaces:
ResourcePostProcessor, ResourcePreProcessor
Direct Known Subclasses:
UglifyJsProcessor

@SupportedResourceType(value=JS)
public class BeautifyJsProcessor
extends Object
implements ResourcePreProcessor, ResourcePostProcessor

Perform a beautify operation on javascript by nicely formatting it.

Since:
1.3.1
Author:
Alex Objelean

Field Summary
static String ALIAS_BEAUTIFY
           
 
Constructor Summary
BeautifyJsProcessor()
          Default constructor.
 
Method Summary
protected  UglifyJs newEngine()
           
protected  void onException(WroRuntimeException e)
          Invoked when a processing exception occurs.
 void process(Reader reader, Writer writer)
          
 void process(Resource resource, Reader reader, Writer writer)
          
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

ALIAS_BEAUTIFY

public static final String ALIAS_BEAUTIFY
See Also:
Constant Field Values
Constructor Detail

BeautifyJsProcessor

public BeautifyJsProcessor()
Default constructor. Instantiates uglifyJs engine.

Method Detail

newEngine

protected UglifyJs newEngine()
Returns:
new instance of UglifyJs engine.

process

public void process(Resource resource,
                    Reader reader,
                    Writer writer)
             throws IOException

Specified by:
process in interface ResourcePreProcessor
Throws:
IOException

onException

protected void onException(WroRuntimeException e)
Invoked when a processing exception occurs.


process

public void process(Reader reader,
                    Writer writer)
             throws IOException

Specified by:
process in interface ResourcePostProcessor
Throws:
IOException


Copyright © 2008-2012. All Rights Reserved.