Package org.apache.tapestry5.services.javascript

## Class StylesheetLink

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

-     public final class StylesheetLink
      extends java.lang.Object

  Captures the information needed to create a stylesheet link in the final `Document`, or as part of a JSON partial page render response.
  Since:
    5.2.0
  See Also:
    `DocumentLinker`, `JavaScriptStack`

- - ### Constructor Summary

    Constructors
    Constructor | Description
    --- | ---
    `StylesheetLink​(java.lang.String url)` |
    `StylesheetLink​(java.lang.String url, StylesheetOptions options)` |
    `StylesheetLink​(Asset asset)` |
    `StylesheetLink​(Asset asset, StylesheetOptions options)` |

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method | Description
    --- | --- | ---
    `void` | `add​(Element container)` | Invoked to add the stylesheet link to a container element.
    `boolean` | `equals​(java.lang.Object obj)` |
    `StylesheetOptions` | `getOptions()` | Returns an instance of `StylesheetOptions`.
    `java.lang.String` | `getURL()` |
    `java.lang.String` | `toString()` |

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

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

- - ### Constructor Detail

    - #### StylesheetLink

          public StylesheetLink​(Asset asset)

    - #### StylesheetLink

          public StylesheetLink​(Asset asset,
                                StylesheetOptions options)

    - #### StylesheetLink

          public StylesheetLink​(java.lang.String url)

    - #### StylesheetLink

          public StylesheetLink​(java.lang.String url,
                                StylesheetOptions options)

  - ### Method Detail

    - #### getURL

          public java.lang.String getURL()

    - #### getOptions

          public StylesheetOptions getOptions()

      Returns an instance of `StylesheetOptions`. Never returns null (a blank options object is returned if null is passed to the constructor).

    - #### add

          public void add​(Element container)

      Invoked to add the stylesheet link to a container element.
      Parameters:
        `container` - to add the new element to

    - #### toString

          public java.lang.String toString()

      Overrides:
        `toString` in class `java.lang.Object`

    - #### equals

          public boolean equals​(java.lang.Object obj)

      Overrides:
        `equals` in class `java.lang.Object`