Class SpelParserConfiguration
- java.lang.Object
- org.springframework.expression.spel.SpelParserConfiguration
public class SpelParserConfiguration extends Object
Configuration object for the SpEL expression parser.- Since:
- 3.0
- Author:
- Juergen Hoeller, Phillip Webb, Andy Clement
- See Also:
SpelExpressionParser(SpelParserConfiguration)
Constructor Summary
Constructors Constructor Description SpelParserConfiguration()
Create a newSpelParserConfiguration
instance with default settings.SpelParserConfiguration(boolean autoGrowNullReferences, boolean autoGrowCollections)
Create a newSpelParserConfiguration
instance.SpelParserConfiguration(boolean autoGrowNullReferences, boolean autoGrowCollections, int maximumAutoGrowSize)
Create a newSpelParserConfiguration
instance.SpelParserConfiguration(SpelCompilerMode compilerMode, ClassLoader compilerClassLoader)
Create a newSpelParserConfiguration
instance.SpelParserConfiguration(SpelCompilerMode compilerMode, ClassLoader compilerClassLoader, boolean autoGrowNullReferences, boolean autoGrowCollections, int maximumAutoGrowSize)
Create a newSpelParserConfiguration
instance.
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ClassLoader
getCompilerClassLoader()
Return the ClassLoader to use as the basis for expression compilation.SpelCompilerMode
getCompilerMode()
Return the configuration mode for parsers using this configuration object.int
getMaximumAutoGrowSize()
Return the maximum size that a collection can auto grow.boolean
isAutoGrowCollections()
Returntrue
if collections should be automatically grown.boolean
isAutoGrowNullReferences()
Returntrue
ifnull
references should be automatically grown.
Constructor Detail
SpelParserConfiguration
public SpelParserConfiguration()
Create a newSpelParserConfiguration
instance with default settings.
SpelParserConfiguration
public SpelParserConfiguration(@Nullable SpelCompilerMode compilerMode, @Nullable ClassLoader compilerClassLoader)
Create a newSpelParserConfiguration
instance.- Parameters:
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 newSpelParserConfiguration
instance.- Parameters:
autoGrowNullReferences
- if null references should automatically growautoGrowCollections
- if collections should automatically grow- See Also:
SpelParserConfiguration(boolean, boolean, int)
SpelParserConfiguration
public SpelParserConfiguration(boolean autoGrowNullReferences, boolean autoGrowCollections, int maximumAutoGrowSize)
Create a newSpelParserConfiguration
instance.- Parameters:
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 newSpelParserConfiguration
instance.- Parameters:
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
Method Detail
getCompilerMode
public SpelCompilerMode getCompilerMode()
Return the configuration mode for parsers using this configuration object.
getCompilerClassLoader
@Nullable public ClassLoader getCompilerClassLoader()
Return the ClassLoader to use as the basis for expression compilation.
isAutoGrowNullReferences
public boolean isAutoGrowNullReferences()
Returntrue
ifnull
references should be automatically grown.
isAutoGrowCollections
public boolean isAutoGrowCollections()
Returntrue
if collections should be automatically grown.
getMaximumAutoGrowSize
public int getMaximumAutoGrowSize()
Return the maximum size that a collection can auto grow.