Modifier and Type | Method and Description |
---|---|
Config.Builder |
addErrorMessage(java.lang.String key,
java.lang.String value)
Adds a custom error message override.
|
static Config.Builder |
basic()
Creates a basic
Config.Builder . |
Config |
build()
Builds the config.
|
Config.Builder |
depth(int depth)
Sets the recursion depth limit.
|
Config.Builder |
errorMessages(java.util.Map<java.lang.String,java.lang.String> errorMessages)
Sets the custom error message overrides.
|
Config.Builder |
forceCase(boolean forceCase)
Sets whether forcing triggers to lowercase is enabled.
|
Config.Builder |
sessionManager(SessionManager sessionManager)
Sets the
SessionManager for user variables. |
Config.Builder |
strict(boolean strict)
Sets whether strict syntax checking is enabled.
|
Config.Builder |
throwExceptions(boolean throwExceptions)
Sets whether exception throwing is enabled.
|
Config.Builder |
unicodePunctuation(java.lang.String unicodePunctuation)
Sets the unicode punctuation pattern (only used when UTF-8 mode is enabled).
|
static Config.Builder |
utf8()
Creates a basic
Config.Builder with UTF-8 mode enabled. |
Config.Builder |
utf8(boolean utf8)
Sets whether UTF-8 mode is enabled.
|
public Config.Builder throwExceptions(boolean throwExceptions)
throwExceptions
- whether exception throwing is enabledpublic Config.Builder strict(boolean strict)
strict
- whether strict syntax checking is enabledpublic Config.Builder utf8(boolean utf8)
utf8
- whether UTF-8 is enabledpublic Config.Builder unicodePunctuation(java.lang.String unicodePunctuation)
unicodePunctuation
- the unicode punctuation patternpublic Config.Builder forceCase(boolean forceCase)
forceCase
- whether forcing triggers to lowercase is enabledpublic Config.Builder depth(int depth)
depth
- the recursion depth limitpublic Config.Builder sessionManager(SessionManager sessionManager)
SessionManager
for user variables.sessionManager
- the session managerpublic Config.Builder errorMessages(java.util.Map<java.lang.String,java.lang.String> errorMessages)
errorMessages
- the custom error message overridespublic Config.Builder addErrorMessage(java.lang.String key, java.lang.String value)
key
- the key of the error messagevalue
- the custom error messagepublic Config build()
public static Config.Builder basic()
Config.Builder
. A basic builder has all the defaults, plus strict = true
.public static Config.Builder utf8()
Config.Builder
with UTF-8 mode enabled.