Package org.mvel2.integration.impl
Class SimpleSTValueResolver
java.lang.Object
org.mvel2.integration.impl.SimpleSTValueResolver
- All Implemented Interfaces:
Serializable
,VariableResolver
- See Also:
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionSimpleSTValueResolver
(Object value, Class type) SimpleSTValueResolver
(Object value, Class type, boolean updated) -
Method Summary
Modifier and TypeMethodDescriptionint
getFlags()
Returns the bitset of special variable flags.getName()
Returns the name of external variable.getType()
This should return the type of the variable.getValue()
Returns the physical target value of the variable.static Object
handleTypeCoercion
(Class type, Object value) void
setStaticType
(Class type) void
Sets the value of the physical target value.
-
Field Details
-
value
-
type
-
updated
private boolean updated
-
-
Constructor Details
-
SimpleSTValueResolver
-
SimpleSTValueResolver
-
-
Method Details
-
getName
Description copied from interface:VariableResolver
Returns the name of external variable.- Specified by:
getName
in interfaceVariableResolver
- Returns:
- A string representing the variable name.
-
getType
Description copied from interface:VariableResolver
This should return the type of the variable. However, this is not completely necessary, and is particularily only of benefit to systems that require use of MVEL's strict typing facilities. In most cases, this implementation can simply return: Object.class- Specified by:
getType
in interfaceVariableResolver
- Returns:
- A Class instance representing the type of the target variable.
-
setStaticType
- Specified by:
setStaticType
in interfaceVariableResolver
-
getFlags
public int getFlags()Description copied from interface:VariableResolver
Returns the bitset of special variable flags. Internal use only. This should just return 0 in custom implentations.- Specified by:
getFlags
in interfaceVariableResolver
- Returns:
- Bitset of special flags.
-
getValue
Description copied from interface:VariableResolver
Returns the physical target value of the variable.- Specified by:
getValue
in interfaceVariableResolver
- Returns:
- The actual variable value.
-
setValue
Description copied from interface:VariableResolver
Sets the value of the physical target value.- Specified by:
setValue
in interfaceVariableResolver
- Parameters:
value
- The new value.
-
handleTypeCoercion
-