Package 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
  Description
  `final StackExtensionType`
  `type`
  The type of extension.
  `final String`
  `value`
  The value contributed; will have symbols expanded, then be converted to the appropriate type.

- ## Constructor Summary

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

- ## Method Summary

  Modifier and Type
  Method
  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 Details

  - ### 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 Details

  - ### StackExtension

    public StackExtension(StackExtensionType type, String value)

- ## Method Details

  - ### 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