ro.isdc.wro.extensions.processor.js
Class RhinoTypeScriptProcessor
java.lang.Object
ro.isdc.wro.extensions.processor.js.RhinoTypeScriptProcessor
- All Implemented Interfaces:
- ResourcePostProcessor, ResourcePreProcessor
@SupportedResourceType(value=JS)
public class RhinoTypeScriptProcessor
- extends Object
- implements ResourcePreProcessor, ResourcePostProcessor
Compiles TypeScript into javascript in a cross platform manner. Uses rhino to interpret javascript implementation of
the compiler.
- Since:
- 1.6.3
- Author:
- Alex Objelean
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
ALIAS
public static final String ALIAS
- See Also:
- Constant Field Values
RhinoTypeScriptProcessor
public RhinoTypeScriptProcessor()
process
public void process(Resource resource,
Reader reader,
Writer writer)
throws IOException
-
- Specified by:
process in interface ResourcePreProcessor
- Throws:
IOException
onException
protected void onException(Exception e,
String content)
- Invoked when a processing exception occurs.
newCompiler
protected TypeScriptCompiler newCompiler()
- Returns:
- the
TypeScriptCompiler engine implementation. Override it to provide a different version of the typescript.js
library. Useful for upgrading the processor outside the wro4j release.
process
public void process(Reader reader,
Writer writer)
throws IOException
-
- Specified by:
process in interface ResourcePostProcessor
- Throws:
IOException
Copyright © 2008-2013. All Rights Reserved.