| org.mvel.integration.VariableResolverFactory
All known Subclasses: org.mvel.integration.impl.BaseVariableResolver, org.mvel.integration.impl.BaseVariableResolverFactory,
VariableResolverFactory | public interface VariableResolverFactory (Code) | | A VariableResolverFactory is the primary integration point for tying in external variables. The factory is
responsible for returing
org.mvel.integration.VariableResolver 's to the MVEL runtime. Factories are
also structured in a chain to maintain locality-of-reference.
|
Method Summary | |
public VariableResolver | createIndexedVariable(int index, String name, Object value) | public VariableResolver | createIndexedVariable(int index, String name, Object value, Class> typee) | public VariableResolver | createVariable(String name, Object value) Creates a new variable. | public VariableResolver | createVariable(String name, Object value, Class> type) Creates a new variable, and assigns a static type. | public VariableResolver | getIndexedVariableResolver(int index) | public Set<String> | getKnownVariables() Return a list of known variables inside the factory. | public VariableResolverFactory | getNextFactory() Returns the next factory in the factory chain. | public VariableResolver | getVariableResolver(String name) Return a variable resolver for the specified variable name. | public boolean | isIndexedFactory() | public boolean | isResolveable(String name) Determines whether or not the variable is resolver in the chain of factories. | public boolean | isTarget(String name) Deterimines whether or not the current VariableResolverFactory is the physical target for the actual
variable. | public VariableResolver | setIndexedVariableResolver(int index, VariableResolver variableResolver) | public VariableResolverFactory | setNextFactory(VariableResolverFactory resolverFactory) Sets the next factory in the chain. | public int | variableIndexOf(String name) |
createVariable | public VariableResolver createVariable(String name, Object value)(Code) | | Creates a new variable. This probably doesn't need to be implemented in most scenarios. This is
used for variable assignment.
Parameters: name - - name of the variable being created Parameters: value - - value of the variable instance of the variable resolver associated with the variable |
createVariable | public VariableResolver createVariable(String name, Object value, Class> type)(Code) | | Creates a new variable, and assigns a static type. It is expected the underlying factory and resolver
will enforce this.
Parameters: name - - name of the variable being created Parameters: value - - value of the variable Parameters: type - - the static type instance of the variable resolver associated with the variable |
getKnownVariables | public Set<String> getKnownVariables()(Code) | | Return a list of known variables inside the factory. This method should not recurse into other factories.
But rather return only the variables living inside this factory.
|
getNextFactory | public VariableResolverFactory getNextFactory()(Code) | | Returns the next factory in the factory chain. MVEL uses a hierarchical variable resolution strategy,
much in the same way as Classloaders in Java. For performance reasons, it is the responsibility of
the individual VariableResolverFactory to pass off to the next one.
instance of the next factory - null if none. |
getVariableResolver | public VariableResolver getVariableResolver(String name)(Code) | | Return a variable resolver for the specified variable name. This method is expected to traverse the
heirarchy of ResolverFactories.
Parameters: name - - variable name - instance of the VariableResolver for the specified variable |
isIndexedFactory | public boolean isIndexedFactory()(Code) | | |
isResolveable | public boolean isResolveable(String name)(Code) | | Determines whether or not the variable is resolver in the chain of factories.
Parameters: name - - variable name - boolean |
isTarget | public boolean isTarget(String name)(Code) | | Deterimines whether or not the current VariableResolverFactory is the physical target for the actual
variable.
Parameters: name - - variable name - boolean indicating whether or not factory is the physical target |
setNextFactory | public VariableResolverFactory setNextFactory(VariableResolverFactory resolverFactory)(Code) | | Sets the next factory in the chain. Proper implementation:
return this.nextFactory = resolverFactory;
Parameters: resolverFactory - - instance of next resolver factory - instance of next resolver factory |
variableIndexOf | public int variableIndexOf(String name)(Code) | | |
|
|