org.apache.tapestry5.internal.webresources

## Class GoogleClosureMinimizer

- java.lang.Object
- - org.apache.tapestry5.internal.webresources.AbstractMinimizer
  - - org.apache.tapestry5.internal.webresources.GoogleClosureMinimizer

- All Implemented Interfaces:
    ResourceMinimizer

      public class GoogleClosureMinimizer
      extends AbstractMinimizer

  A wrapper around the Google Closure `Compiler` used to minimize a JavaScript resource.

- - ### Field Summary

    - ### Fields inherited from class org.apache.tapestry5.internal.webresources.AbstractMinimizer

      `logger, tracker`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `GoogleClosureMinimizer(org.slf4j.Logger logger, OperationTracker tracker, AssetChecksumGenerator checksumGenerator, Request request, com.google.javascript.jscomp.CompilationLevel compilationLevel)`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `protected InputStream` | `doMinimize(StreamableResource resource)` Implemented in subclasses to do the actual work.
    `protected boolean` | `isEnabled(StreamableResource resource)` Determines if the resource can be minimized.

    - ### Methods inherited from class org.apache.tapestry5.internal.webresources.AbstractMinimizer

      `minimize`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### GoogleClosureMinimizer

          public GoogleClosureMinimizer(org.slf4j.Logger logger,
                                        OperationTracker tracker,
                                        AssetChecksumGenerator checksumGenerator,
                                        Request request,
                                        @Symbol(value="tapestry.closure-compiler-level")
                                        com.google.javascript.jscomp.CompilationLevel compilationLevel)

  - ### Method Detail

    - #### isEnabled

          protected boolean isEnabled(StreamableResource resource)

      Description copied from class: `AbstractMinimizer`
      Determines if the resource can be minimized.
      Overrides:
        `isEnabled` in class `AbstractMinimizer`
      Returns:
        true, subclasses may override

    - #### doMinimize

          protected InputStream doMinimize(StreamableResource resource)
                                    throws IOException

      Description copied from class: `AbstractMinimizer`
      Implemented in subclasses to do the actual work.
      Specified by:
        `doMinimize` in class `AbstractMinimizer`
      Parameters:
        `resource` - content to minimize
      Returns:
        stream of minimized content
      Throws:
        `IOException`

${project.version} - Copyright © 2003-2015 The Apache Software Foundation.