Package org.mvel2.integration
Interface VariableResolver
-
- All Superinterfaces:
Serializable
- All Known Implementing Classes:
IndexVariableResolver,ItemResolverFactory.ItemResolver,MapVariableResolver,PrecachedMapVariableResolver,Proto.ProtoResolver,SimpleSTValueResolver,SimpleValueResolver,StaticMethodImportResolver
public interface VariableResolver extends Serializable
A variable resolver is responsible for physically accessing a variable, for either read or write. VariableResolver's are obtained via aVariableResolverFactory.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description intgetFlags()Returns the bitset of special variable flags.StringgetName()Returns the name of external variable.ClassgetType()This should return the type of the variable.ObjectgetValue()Returns the physical target value of the variable.voidsetStaticType(Class type)voidsetValue(Object value)Sets the value of the physical target value.
-
-
-
Method Detail
-
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
void setStaticType(Class type)
-
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
void setValue(Object value)
Sets the value of the physical target value.- Parameters:
value- The new value.
-
-