类 SpelParserConfiguration
java.lang.Object
cn.taketoday.expression.spel.SpelParserConfiguration
Configuration object for the SpEL expression parser.
- 从以下版本开始:
- 4.0
- 作者:
- Juergen Hoeller, Phillip Webb, Andy Clement, Harry Yang
- 另请参阅:
-
字段概要
字段修饰符和类型字段说明private final booleanprivate final booleanprivate final ClassLoaderprivate final SpelCompilerModeprivate static final intDefault maximum length permitted for a SpEL expression.private static final SpelCompilerModeprivate final intprivate final intstatic final StringSystem property to configure the default compiler mode for SpEL expression parsers: "spel.compiler.mode". -
构造器概要
构造器构造器说明Create a newSpelParserConfigurationinstance with default settings.SpelParserConfiguration(boolean autoGrowNullReferences, boolean autoGrowCollections) Create a newSpelParserConfigurationinstance.SpelParserConfiguration(boolean autoGrowNullReferences, boolean autoGrowCollections, int maximumAutoGrowSize) Create a newSpelParserConfigurationinstance.SpelParserConfiguration(SpelCompilerMode compilerMode, ClassLoader compilerClassLoader) Create a newSpelParserConfigurationinstance.SpelParserConfiguration(SpelCompilerMode compilerMode, ClassLoader compilerClassLoader, boolean autoGrowNullReferences, boolean autoGrowCollections, int maximumAutoGrowSize) Create a newSpelParserConfigurationinstance.SpelParserConfiguration(SpelCompilerMode compilerMode, ClassLoader compilerClassLoader, boolean autoGrowNullReferences, boolean autoGrowCollections, int maximumAutoGrowSize, int maximumExpressionLength) Create a newSpelParserConfigurationinstance. -
方法概要
修饰符和类型方法说明Return the ClassLoader to use as the basis for expression compilation.Return the compiler mode for parsers using this configuration object.intReturn the maximum size that a collection can auto grow.intReturn the maximum number of characters that a SpEL expression can contain.booleanReturntrueif collections should be automatically grown.booleanReturntrueifnullreferences should be automatically grown.
-
字段详细资料
-
SPRING_EXPRESSION_COMPILER_MODE_PROPERTY_NAME
System property to configure the default compiler mode for SpEL expression parsers: "spel.compiler.mode".- 另请参阅:
-
defaultCompilerMode
-
DEFAULT_MAX_EXPRESSION_LENGTH
private static final int DEFAULT_MAX_EXPRESSION_LENGTHDefault maximum length permitted for a SpEL expression.- 另请参阅:
-
compilerMode
-
compilerClassLoader
-
autoGrowNullReferences
private final boolean autoGrowNullReferences -
autoGrowCollections
private final boolean autoGrowCollections -
maximumAutoGrowSize
private final int maximumAutoGrowSize -
maximumExpressionLength
private final int maximumExpressionLength
-
-
构造器详细资料
-
SpelParserConfiguration
public SpelParserConfiguration()Create a newSpelParserConfigurationinstance with default settings. -
SpelParserConfiguration
public SpelParserConfiguration(@Nullable SpelCompilerMode compilerMode, @Nullable ClassLoader compilerClassLoader) Create a newSpelParserConfigurationinstance.- 参数:
compilerMode- the compiler mode for the parsercompilerClassLoader- the ClassLoader to use as the basis for expression compilation
-
SpelParserConfiguration
public SpelParserConfiguration(boolean autoGrowNullReferences, boolean autoGrowCollections) Create a newSpelParserConfigurationinstance.- 参数:
autoGrowNullReferences- if null references should automatically growautoGrowCollections- if collections should automatically grow- 另请参阅:
-
SpelParserConfiguration
public SpelParserConfiguration(boolean autoGrowNullReferences, boolean autoGrowCollections, int maximumAutoGrowSize) Create a newSpelParserConfigurationinstance.- 参数:
autoGrowNullReferences- if null references should automatically growautoGrowCollections- if collections should automatically growmaximumAutoGrowSize- the maximum size that the collection can auto grow
-
SpelParserConfiguration
public SpelParserConfiguration(@Nullable SpelCompilerMode compilerMode, @Nullable ClassLoader compilerClassLoader, boolean autoGrowNullReferences, boolean autoGrowCollections, int maximumAutoGrowSize) Create a newSpelParserConfigurationinstance.- 参数:
compilerMode- the compiler mode that parsers using this configuration object should usecompilerClassLoader- the ClassLoader to use as the basis for expression compilationautoGrowNullReferences- if null references should automatically growautoGrowCollections- if collections should automatically growmaximumAutoGrowSize- the maximum size that the collection can auto grow
-
SpelParserConfiguration
public SpelParserConfiguration(@Nullable SpelCompilerMode compilerMode, @Nullable ClassLoader compilerClassLoader, boolean autoGrowNullReferences, boolean autoGrowCollections, int maximumAutoGrowSize, int maximumExpressionLength) Create a newSpelParserConfigurationinstance.- 参数:
compilerMode- the compiler mode that parsers using this configuration object should usecompilerClassLoader- the ClassLoader to use as the basis for expression compilationautoGrowNullReferences- if null references should automatically growautoGrowCollections- if collections should automatically growmaximumAutoGrowSize- the maximum size that a collection can auto growmaximumExpressionLength- the maximum length of a SpEL expression; must be a positive number
-
-
方法详细资料
-
getCompilerMode
Return the compiler mode for parsers using this configuration object. -
getCompilerClassLoader
Return the ClassLoader to use as the basis for expression compilation. -
isAutoGrowNullReferences
public boolean isAutoGrowNullReferences()Returntrueifnullreferences should be automatically grown. -
isAutoGrowCollections
public boolean isAutoGrowCollections()Returntrueif collections should be automatically grown. -
getMaximumAutoGrowSize
public int getMaximumAutoGrowSize()Return the maximum size that a collection can auto grow. -
getMaximumExpressionLength
public int getMaximumExpressionLength()Return the maximum number of characters that a SpEL expression can contain.
-