Package org.mvel2.ast
Class InvokationContextFactory
java.lang.Object
org.mvel2.integration.impl.BaseVariableResolverFactory
org.mvel2.integration.impl.MapVariableResolverFactory
org.mvel2.ast.InvokationContextFactory
- All Implemented Interfaces:
Serializable,VariableResolverFactory
- Author:
- Mike Brock
- See Also:
-
Field Summary
Fields inherited from class org.mvel2.integration.impl.MapVariableResolverFactory
variablesFields inherited from class org.mvel2.integration.impl.BaseVariableResolverFactory
indexedVariableNames, indexedVariableResolvers, indexOffset, nextFactory, variableResolvers -
Constructor Summary
ConstructorsConstructorDescriptionInvokationContextFactory(VariableResolverFactory next, VariableResolverFactory protoContext) -
Method Summary
Modifier and TypeMethodDescriptioncreateVariable(String name, Object value) Creates a new variable.createVariable(String name, Object value, Class<?> type) Creates a new variable, and assigns a static type.getVariableResolver(String name) Return a variable resolver for the specified variable name.booleanbooleanisResolveable(String name) Determines whether or not the variable is resolver in the chain of factories.booleanDeterimines whether or not the current VariableResolverFactory is the physical target for the actual variable.Methods inherited from class org.mvel2.integration.impl.MapVariableResolverFactory
addResolver, clear, getKnownVariablesMethods inherited from class org.mvel2.integration.impl.BaseVariableResolverFactory
appendFactory, breakFlag, createIndexedVariable, createIndexedVariable, getIndexedVariableNames, getIndexedVariableResolver, getNextFactory, getVariableResolvers, insertFactory, isNextResolveable, setBreakFlag, setIndexedVariableNames, setIndexedVariableResolver, setNextFactory, setTiltFlag, setVariableResolvers, tiltFlag, variableIndexOf
-
Constructor Details
-
InvokationContextFactory
-
-
Method Details
-
createVariable
Description copied from interface:VariableResolverFactoryCreates a new variable. This probably doesn't need to be implemented in most scenarios. This is used for variable assignment.- Specified by:
createVariablein interfaceVariableResolverFactory- Overrides:
createVariablein classMapVariableResolverFactory- Parameters:
name- - name of the variable being createdvalue- - value of the variable- Returns:
- instance of the variable resolver associated with the variable
-
createVariable
Description copied from interface:VariableResolverFactoryCreates a new variable, and assigns a static type. It is expected the underlying factory and resolver will enforce this.- Specified by:
createVariablein interfaceVariableResolverFactory- Overrides:
createVariablein classMapVariableResolverFactory- Parameters:
name- - name of the variable being createdvalue- - value of the variabletype- - the static type- Returns:
- instance of the variable resolver associated with the variable
-
getVariableResolver
Description copied from interface:VariableResolverFactoryReturn a variable resolver for the specified variable name. This method is expected to traverse the heirarchy of ResolverFactories.- Specified by:
getVariableResolverin interfaceVariableResolverFactory- Overrides:
getVariableResolverin classMapVariableResolverFactory- Parameters:
name- - variable name- Returns:
- - instance of the VariableResolver for the specified variable
-
isTarget
Description copied from interface:VariableResolverFactoryDeterimines whether or not the current VariableResolverFactory is the physical target for the actual variable.- Specified by:
isTargetin interfaceVariableResolverFactory- Overrides:
isTargetin classMapVariableResolverFactory- Parameters:
name- - variable name- Returns:
- - boolean indicating whether or not factory is the physical target
-
isResolveable
Description copied from interface:VariableResolverFactoryDetermines whether or not the variable is resolver in the chain of factories.- Specified by:
isResolveablein interfaceVariableResolverFactory- Overrides:
isResolveablein classMapVariableResolverFactory- Parameters:
name- - variable name- Returns:
- - boolean
-
isIndexedFactory
public boolean isIndexedFactory()- Specified by:
isIndexedFactoryin interfaceVariableResolverFactory- Overrides:
isIndexedFactoryin classBaseVariableResolverFactory
-