Class SpelParserConfiguration
java.lang.Object
org.springframework.expression.spel.SpelParserConfiguration
Configuration object for the SpEL expression parser.
- Since:
- 3.0
- Author:
- Juergen Hoeller, Phillip Webb, Andy Clement
- See Also:
- 
Field SummaryFieldsModifier and TypeFieldDescriptionstatic final StringSystem property to configure the default compiler mode for SpEL expression parsers: "spring.expression.compiler.mode".
- 
Constructor SummaryConstructorsConstructorDescriptionCreate 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.
- 
Method SummaryModifier and TypeMethodDescriptionReturn 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.booleanReturntrueif collections should be automatically grown.booleanReturntrueifnullreferences should be automatically grown.
- 
Field Details- 
SPRING_EXPRESSION_COMPILER_MODE_PROPERTY_NAMESystem property to configure the default compiler mode for SpEL expression parsers: "spring.expression.compiler.mode".- See Also:
 
 
- 
- 
Constructor Details- 
SpelParserConfigurationpublic SpelParserConfiguration()Create a newSpelParserConfigurationinstance with default settings.
- 
SpelParserConfigurationpublic SpelParserConfiguration(@Nullable SpelCompilerMode compilerMode, @Nullable ClassLoader compilerClassLoader) Create a newSpelParserConfigurationinstance.- Parameters:
- compilerMode- the compiler mode for the parser
- compilerClassLoader- the ClassLoader to use as the basis for expression compilation
 
- 
SpelParserConfigurationpublic SpelParserConfiguration(boolean autoGrowNullReferences, boolean autoGrowCollections) Create a newSpelParserConfigurationinstance.- Parameters:
- autoGrowNullReferences- if null references should automatically grow
- autoGrowCollections- if collections should automatically grow
- See Also:
 
- 
SpelParserConfigurationpublic SpelParserConfiguration(boolean autoGrowNullReferences, boolean autoGrowCollections, int maximumAutoGrowSize) Create a newSpelParserConfigurationinstance.- Parameters:
- autoGrowNullReferences- if null references should automatically grow
- autoGrowCollections- if collections should automatically grow
- maximumAutoGrowSize- the maximum size that the collection can auto grow
 
- 
SpelParserConfigurationpublic SpelParserConfiguration(@Nullable SpelCompilerMode compilerMode, @Nullable ClassLoader compilerClassLoader, boolean autoGrowNullReferences, boolean autoGrowCollections, int maximumAutoGrowSize) Create a newSpelParserConfigurationinstance.- Parameters:
- compilerMode- the compiler mode that parsers using this configuration object should use
- compilerClassLoader- the ClassLoader to use as the basis for expression compilation
- autoGrowNullReferences- if null references should automatically grow
- autoGrowCollections- if collections should automatically grow
- maximumAutoGrowSize- the maximum size that the collection can auto grow
 
 
- 
- 
Method Details- 
getCompilerModeReturn the compiler mode for parsers using this configuration object.
- 
getCompilerClassLoaderReturn the ClassLoader to use as the basis for expression compilation.
- 
isAutoGrowNullReferencespublic boolean isAutoGrowNullReferences()Returntrueifnullreferences should be automatically grown.
- 
isAutoGrowCollectionspublic boolean isAutoGrowCollections()Returntrueif collections should be automatically grown.
- 
getMaximumAutoGrowSizepublic int getMaximumAutoGrowSize()Return the maximum size that a collection can auto grow.
 
-