Class JavaScriptCompressorDirective
- java.lang.Object
-
- org.apache.velocity.runtime.directive.Directive
-
- com.googlecode.htmlcompressor.velocity.JavaScriptCompressorDirective
-
- All Implemented Interfaces:
Cloneable,org.apache.velocity.runtime.directive.DirectiveConstants
public class JavaScriptCompressorDirective extends org.apache.velocity.runtime.directive.DirectiveVelocity directive that compresses an JavaScript content within #compressJs ... #end block. All JavaScript-related properties fromHtmlCompressorare supported.- Author:
- Sergiy Kovalchuk
- See Also:
HtmlCompressor, Yahoo YUI Compressor, Google Closure Compiler
-
-
Constructor Summary
Constructors Constructor Description JavaScriptCompressorDirective()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description StringgetName()intgetType()voidinit(org.apache.velocity.runtime.RuntimeServices rs, org.apache.velocity.context.InternalContextAdapter context, org.apache.velocity.runtime.parser.node.Node node)booleanrender(org.apache.velocity.context.InternalContextAdapter context, Writer writer, org.apache.velocity.runtime.parser.node.Node node)
-
-
-
Method Detail
-
getName
public String getName()
- Specified by:
getNamein classorg.apache.velocity.runtime.directive.Directive
-
getType
public int getType()
- Specified by:
getTypein classorg.apache.velocity.runtime.directive.Directive
-
init
public void init(org.apache.velocity.runtime.RuntimeServices rs, org.apache.velocity.context.InternalContextAdapter context, org.apache.velocity.runtime.parser.node.Node node) throws org.apache.velocity.exception.TemplateInitException- Overrides:
initin classorg.apache.velocity.runtime.directive.Directive- Throws:
org.apache.velocity.exception.TemplateInitException
-
render
public boolean render(org.apache.velocity.context.InternalContextAdapter context, Writer writer, org.apache.velocity.runtime.parser.node.Node node) throws IOException, org.apache.velocity.exception.MethodInvocationException- Specified by:
renderin classorg.apache.velocity.runtime.directive.Directive- Throws:
IOExceptionorg.apache.velocity.exception.MethodInvocationException
-
-