@Retention(RUNTIME)
@Target({MODULE,PACKAGE,TYPE,ANNOTATION_TYPE})
@Documented
public @interface JStachePath
Configure how the paths of templates map to actual source resources.
Order of path config lookup and precedence is as follows:
- type annotated with JStache and this annotation.
- enclosing class (of type annotated with JStache) with this annotation with inner to outer order.
- package annotated with this annotation.
- module annotated with this annotation.
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
-
Field Summary
Modifier and TypeFieldDescriptionstatic 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 ifUNSPECIFIED
.static final String
The default suffix ifUNSPECIFIED
.static final String
The value to mean the suffix and prefix is not set.
-
Field Details
-
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
The default prefix ifUNSPECIFIED
.- See Also:
-
DEFAULT_SUFFIX
The default suffix ifUNSPECIFIED
.- See Also:
-
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
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 toDEFAULT_PREFIX
if not set elsewhere.
- Default:
- "*"
-
suffix
Suffix the path. A common use case is to suffix with ".mustache".- Returns:
- suffix of path by default is
UNSPECIFIED
which will resolve toDEFAULT_SUFFIX
if not set elsewhere.
- Default:
- "*"
-