public class RythmConfiguration extends Object
rythm engine
instance. Different engine instance has different configuration instance.Modifier and Type | Field and Description |
---|---|
static RythmConfiguration |
EMPTY_CONF |
Constructor and Description |
---|
RythmConfiguration(Map<String,?> configuration,
RythmEngine engine)
Construct a
RythmConfiguration with a map. |
public static final RythmConfiguration EMPTY_CONF
public RythmConfiguration(Map<String,?> configuration, RythmEngine engine)
RythmConfiguration
with a map. The map is copied to
the original map of the configuration instanceconfiguration
- public <T> T get(RythmConfigurationKey key)
configuration key
T
- key
- public <T> List<T> getList(RythmConfigurationKey key, Class<T> c)
T
- key
- c
- public <T> T get(String key)
String
key. If the String key
can be converted into rythm configuration key
, then
it is converted and call to get(RythmConfigurationKey)
method. Otherwise
the original configuration map is used to fetch the value from the string key
T
- key
- public String pluginVersion()
plugin version
without lookuppublic IByteCodeHelper byteCodeHelper()
RythmConfigurationKey.ENGINE_CLASS_LOADER_BYTE_CODE_HELPER_IMPL
without lookuppublic boolean playFramework()
RythmConfigurationKey.ENGINE_PLAYFRAMEWORK
without lookuppublic boolean logRenderTime()
RythmConfigurationKey.LOG_TIME_RENDER_ENABLED
without
look uppublic boolean loadPrecompiled()
RythmConfigurationKey.ENGINE_LOAD_PRECOMPILED_ENABLED
without lookuppublic boolean precompileMode()
RythmConfigurationKey.ENGINE_PRECOMPILE_MODE
without lookuppublic boolean disableFileWrite()
RythmConfigurationKey.ENGINE_FILE_WRITE_ENABLED
without lookuppublic boolean gae()
public Set<String> restrictedClasses()
RythmConfigurationKey.SANDBOX_RESTRICTED_CLASS
without lookup
Note, the return value also contains rythm's built-in restricted classes
public boolean typeInferenceEnabled()
RythmConfigurationKey.FEATURE_TYPE_INFERENCE_ENABLED
without
lookuppublic boolean smartEscapeEnabled()
RythmConfigurationKey.FEATURE_SMART_ESCAPE_ENABLED
without lookuppublic boolean naturalTemplateEnabled()
RythmConfigurationKey.FEATURE_NATURAL_TEMPLATE_ENABLED
without lookuppublic boolean debugJavaSourceEnabled()
RythmConfigurationKey.ENGINE_OUTPUT_JAVA_SOURCE_ENABLED
without lookuppublic boolean cacheEnabled()
public boolean cacheDisabled()
cacheEnabled()
public boolean transformEnabled()
RythmConfigurationKey.FEATURE_TRANSFORM_ENABLED
without look uppublic boolean compactModeEnabled()
RythmConfigurationKey.CODEGEN_COMPACT_ENABLED
without look uppublic IDurationParser durationParser()
RythmConfigurationKey.CACHE_DURATION_PARSER_IMPL
without lookuppublic ICodeType defaultCodeType()
RythmConfigurationKey.DEFAULT_CODE_TYPE_IMPL
without lookuppublic File tmpDir()
RythmConfigurationKey.HOME_TMP
without lookuppublic List<URI> templateHome()
RythmConfigurationKey.HOME_TEMPLATE
without lookuppublic void setTemplateHome(File home)
Note, this is not supposed to be used by user application or third party plugin
public IByteCodeEnhancer byteCodeEnhancer()
RythmConfigurationKey.CODEGEN_BYTE_CODE_ENHANCER
without lookuppublic ISourceCodeEnhancer sourceEnhancer()
public Locale locale()
RythmConfigurationKey.I18N_LOCALE
without lookuppublic List<String> messageSources()
RythmConfigurationKey.I18N_MESSAGE_SOURCES
without lookuppublic II18nMessageResolver i18nMessageResolver()
RythmConfigurationKey.I18N_MESSAGE_RESOLVER
without lookuppublic String resourceNameSuffix()
RythmConfigurationKey.RESOURCE_NAME_SUFFIX
without lookuppublic boolean autoScan()
public String allowedSystemProperties()
public boolean sandboxTmpIO()
public boolean hasGlobalInclude()
public static RythmConfiguration get()
empty configuration
is returnedpublic void debug()
Copyright © 2015. All Rights Reserved.