java.lang.Object
java.lang.Enum<TemplateConfig.ResourceMode>
org.miaixz.bus.extra.template.TemplateConfig.ResourceMode
- All Implemented Interfaces:
Serializable,Comparable<TemplateConfig.ResourceMode>,Constable
- Enclosing class:
TemplateConfig
Enumeration defining different modes for loading template resources.
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>> -
Enum Constant Summary
Enum ConstantsEnum ConstantDescriptionLoads templates from the ClassPath.Attempts to load templates using a composite strategy, trying File, ClassPath, WebRoot, and String modes in sequence.Loads templates from a file system directory.Treats the template content as a direct string.Loads templates from the WebRoot directory (e.g., in a web application). -
Method Summary
Modifier and TypeMethodDescriptionstatic TemplateConfig.ResourceModeReturns the enum constant of this class with the specified name.static TemplateConfig.ResourceMode[]values()Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
CLASSPATH
Loads templates from the ClassPath. -
FILE
Loads templates from a file system directory. -
WEB_ROOT
Loads templates from the WebRoot directory (e.g., in a web application). -
STRING
Treats the template content as a direct string. -
COMPOSITE
Attempts to load templates using a composite strategy, trying File, ClassPath, WebRoot, and String modes in sequence.
-
-
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
-