Package org.mvel2.integration
Interface VariableResolver
- All Superinterfaces:
Serializable
- All Known Implementing Classes:
IndexVariableResolver
,ItemResolverFactory.ItemResolver
,MapVariableResolver
,PrecachedMapVariableResolver
,Proto.ProtoResolver
,SimpleSTValueResolver
,SimpleValueResolver
,StaticMethodImportResolver
A variable resolver is responsible for physically accessing a variable, for either read or write. VariableResolver's
are obtained via a
VariableResolverFactory
.-
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.void
setStaticType
(Class type) void
Sets the value of the physical target value.
-
Method Details
-
getName
String getName()Returns the name of external variable.- Returns:
- A string representing the variable name.
-
getType
Class getType()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- Returns:
- A Class instance representing the type of the target variable.
-
setStaticType
-
getFlags
int getFlags()Returns the bitset of special variable flags. Internal use only. This should just return 0 in custom implentations.- Returns:
- Bitset of special flags.
-
getValue
Object getValue()Returns the physical target value of the variable.- Returns:
- The actual variable value.
-
setValue
Sets the value of the physical target value.- Parameters:
value
- The new value.
-