- All Implemented Interfaces:
Serializable
,Comparable<DropwizardJStacheConfig>
,Constable
@JStacheConfig(pathing=@JStachePath(suffix=".mustache"),
interfacing=@JStacheInterfaces(modelImplements=JStacheViewSupport.class,templateImplements=ViewableTemplate.class))
public enum DropwizardJStacheConfig
extends Enum<DropwizardJStacheConfig>
Opinionated static config for dropwizard based on how dropwizard stores templates for
Mustache.java. Place the below on a
package-info.java
where your JStache
models are or if in a modular environment module-info.java
@JStacheConfig(using = DropwizardJStacheConfig.class)
// some class, package-info, module-info
Assuming you have a JStache model with class name MyView
in package
com.company.model
The template location if not specified will default to:
src/main/resources/com/company/model/MyModel.mustache
.
This configuration will also enforce and check that your models implements
JStacheViewSupport
which provides JStacheViewSupport.toView()
.
- Author:
- agentgt
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>>
-
Method Summary
Modifier and TypeMethodDescriptionstatic DropwizardJStacheConfig
Returns the enum constant of this class with the specified name.static DropwizardJStacheConfig[]
values()
Returns an array containing the constants of this enum class, in the order they are declared.
-
Method Details
-
values
Returns an array containing the constants of this enum class, in the order they are declared.- Returns:
- an array containing the constants of this enum class, in the order they are declared
-
valueOf
Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)- Parameters:
name
- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException
- if this enum class has no constant with the specified nameNullPointerException
- if the argument is null
-