org.apache.tapestry5

## Interface Asset2

- All Superinterfaces:
    Asset
  All Known Implementing Classes:
    AbstractAsset, UrlAsset

      public interface Asset2
      extends Asset

  Extension to `Asset` that adds a method to determine if the asset is invariant or not. `AssetFactory` instances should ideally return Asset2 objects, not Asset. This is only of primary interest to the `AssetBindingFactory`, as it determines the invariance of the binding from the asset (and assumes variant unless the asset object implements this interface).
  Since:
    5.1.0.0

- - ### Method Summary

    All Methods Instance Methods Abstract Methods
    Modifier and Type | Method and Description
    --- | ---
    `boolean` | `isInvariant()` Returns true if the Asset is invariant (meaning that it returns the same value from `Asset.toClientURL()` at all times).

    - ### Methods inherited from interface org.apache.tapestry5.Asset

      `getResource, toClientURL`

- - ### Method Detail

    - #### isInvariant

          boolean isInvariant()

      Returns true if the Asset is invariant (meaning that it returns the same value from `Asset.toClientURL()` at all times). Most Assets are invariant. Assets that are used as binding values will be cached more aggressively by Tapestry if they are invariant.
      Returns:
        true if invariant
      See Also:
        `AssetPathConverter.isInvariant()`, `Binding.isInvariant()`

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