org.apache.tapestry5.services.javascript

## Class StackExtension

- java.lang.Object
- - org.apache.tapestry5.services.javascript.StackExtension

-     public class StackExtension
      extends Object

  A contribution to an extensible `JavaScriptStack`. Such a stack is created in terms of all the contributions.
  Since:
    5.3
  See Also:
    `ExtensibleJavaScriptStack`

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `StackExtensionType` | `type` The type of extension.
    `String` | `value` The value contributed; will have symbols expanded, then be converted to the appropriate type.

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `StackExtension(StackExtensionType type, String value)`

  - ### Method Summary

    All Methods Static Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `static StackExtension` | `javascriptAggregation(JavaScriptAggregationStrategy strategy)` Convenience for defining the `JavaScriptStack.getJavaScriptAggregationStrategy()`.
    `static StackExtension` | `library(String path)` Convenience for defining a LIBRARY.
    `static StackExtension` | `module(String name)` Convenience for defining a MODULE.
    `static StackExtension` | `stack(String name)` Convenience for defining a STACK.
    `static StackExtension` | `stylesheet(String path)` Convenience for defining a STYLESHEET.
    `String` | `toString()`

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

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

- - ### Field Detail

    - #### type

          public final StackExtensionType type

      The type of extension.

    - #### value

          public final String value

      The value contributed; will have symbols expanded, then be converted to the appropriate type.

  - ### Constructor Detail

    - #### StackExtension

          public StackExtension(StackExtensionType type,
                                String value)

  - ### Method Detail

    - #### toString

          public String toString()

      Overrides:
        `toString` in class `Object`

    - #### library

          public static StackExtension library(String path)

      Convenience for defining a LIBRARY.
      Since:
        5.4

    - #### module

          public static StackExtension module(String name)

      Convenience for defining a MODULE.
      Since:
        5.4

    - #### stylesheet

          public static StackExtension stylesheet(String path)

      Convenience for defining a STYLESHEET.
      Since:
        5.4

    - #### stack

          public static StackExtension stack(String name)

      Convenience for defining a STACK.
      Since:
        5.4

    - #### javascriptAggregation

          public static StackExtension javascriptAggregation(JavaScriptAggregationStrategy strategy)

      Convenience for defining the `JavaScriptStack.getJavaScriptAggregationStrategy()`.
      Since:
        5.4

5.6.0 - Copyright © 2003-2020 The Apache Software Foundation.