- All Implemented Interfaces:
Serializable
,Comparable<Setting>
,Constable
Specifies all system properties and/or environment variables that will be picked
up by Klojang Templates. Environment variables take precedence over system
properties.
- Author:
- Ayco Holleman
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>>
-
Enum Constant Summary
Enum ConstantsEnum ConstantDescriptionSystem Property:org.klojang.templates.cacheSize
Environment Variable:KJT_CACHE_SIZE
Default Value:-1
. -
Method Summary
Modifier and TypeMethodDescriptionReturns the default value for this setting.envVar()
Returns the name of the environment variable for this setting.get()
Returns the value of this setting or its default value if not specified.property()
Returns the name of the system property for this setting.static Setting
Returns the enum constant of this class with the specified name.static Setting[]
values()
Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
TMPL_CACHE_SIZE
System Property:
org.klojang.templates.cacheSize
Environment Variable:KJT_CACHE_SIZE
Default Value:-1
.Specifies the maximum size of an internally maintained cache of
Template
instances - used to reduce the overhead of parsing template files. When the cache reaches the specified size,Template
instances are evicted on a least-recently-used basis. A value of -1 means the cache is allowed to grow to any size. A value of 0 disables caching. This is useful during development and/or debugging as the template file will be re-loaded and re-parsed every time you press the refresh button in the browser.
-
-
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
-
property
Returns the name of the system property for this setting.- Returns:
- the name of the system property for this setting
-
envVar
Returns the name of the environment variable for this setting.- Returns:
- the name of the environment variable for this setting
-
defaultValue
Returns the default value for this setting.- Returns:
- the default value for this setting
-
get
Returns the value of this setting or its default value if not specified.- Returns:
- the value of this setting or its default value if not specified
-