Package: groovy.text.markup

## [Java] Class MarkupTemplateEngine.TemplateResource

- groovy.text.markup.MarkupTemplateEngine.TemplateResource

-     public static class MarkupTemplateEngine.TemplateResource
      extends Object

  Describes a template resource name split into base name, optional locale suffix, and extension.

- - ### Methods Summary

    Methods
    Type Params | Return Type | Name and description
    --- | --- | ---
    `` | `public boolean` | `hasLocale()` Indicates whether this descriptor carries an explicit locale suffix.
    `` | `public static MarkupTemplateEngine.TemplateResource` | `parse(String fullPath)` Parses a template path into its base name, optional locale suffix, and extension.
    `` | `public String` | `toString()` Returns the resource path represented by this descriptor.
    `` | `public MarkupTemplateEngine.TemplateResource` | `withLocale(String locale)` Returns a copy of this resource descriptor with the supplied locale suffix.

  - ### Inherited Methods Summary

    Inherited Methods
    Methods inherited from class | Name
    --- | ---
    `class Object` | `equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Method Detail

    - #### public boolean hasLocale()

      Indicates whether this descriptor carries an explicit locale suffix.

      Returns:
        `true` if a locale suffix is present

    - #### public static MarkupTemplateEngine.TemplateResource parse(String fullPath)

      Parses a template path into its base name, optional locale suffix, and extension.

      Parameters:
        `fullPath` - template path to parse
      Returns:
        a parsed template resource descriptor

    - #### public String toString()

      Returns the resource path represented by this descriptor.

      Returns:
        the resource path with optional locale suffix

    - #### public MarkupTemplateEngine.TemplateResource withLocale(String locale)

      Returns a copy of this resource descriptor with the supplied locale suffix.

      Parameters:
        `locale` - locale suffix to apply, or `null` to remove it
      Returns:
        a new resource descriptor with the requested locale