Annotation Interface JStachePath


Configure how the paths of templates map to actual source resources. Order of path config lookup and precedence is as follows:
  1. type annotated with JStache and this annotation.
  2. enclosing class (of type annotated with JStache) with this annotation with inner to outer order.
  3. package annotated with this annotation.
  4. module annotated with this annotation.
After this lookup is done then the lookup is repeated using JStacheConfig.pathing() thus using this annotation directly on an element takes precedence over JStacheConfig.

If multiple annotations are found the first one is picked and there is no combining of settings. See JStacheConfig for general config resultion.

Author:
agentgt
See Also:
  • Optional Element Summary

    Optional Elements
    Modifier and Type
    Optional Element
    Description
    Will prefix the path.
    Suffix the path.
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final String
    If a JStache path is empty and template is empty and suffix is unspecified the path will be generated from the class name and suffixed with this constant.
    static final String
    The default prefix if UNSPECIFIED.
    static final String
    The default suffix if UNSPECIFIED.
    static final String
    The value to mean the suffix and prefix is not set.
  • Field Details

    • UNSPECIFIED

      static final String UNSPECIFIED
      The value to mean the suffix and prefix is not set.
      See Also:
      API Note
      The value is purposely not a possible valid prefix or suffix and is not the actual default.
    • DEFAULT_PREFIX

      static final String DEFAULT_PREFIX
      The default prefix if UNSPECIFIED.
      See Also:
    • DEFAULT_SUFFIX

      static final String DEFAULT_SUFFIX
      The default suffix if UNSPECIFIED.
      See Also:
    • AUTO_SUFFIX

      static final String AUTO_SUFFIX
      If a JStache path is empty and template is empty and suffix is unspecified the path will be generated from the class name and suffixed with this constant.
      See Also:
  • Element Details

    • prefix

      String prefix
      Will prefix the path. If you are mapping to a directory remember to end the prefix with a "/".
      Returns:
      prefix of path by default UNSPECIFIED which will resolve to DEFAULT_PREFIX if not set elsewhere.
      Default:
      "*"
    • suffix

      String suffix
      Suffix the path. A common use case is to suffix with ".mustache".
      Returns:
      suffix of path by default is UNSPECIFIED which will resolve to DEFAULT_SUFFIX if not set elsewhere.
      Default:
      "*"