Class TypeInjectionResolverFactoryImpl
java.lang.Object
org.mvel2.integration.impl.BaseVariableResolverFactory
org.mvel2.integration.impl.MapVariableResolverFactory
org.mvel2.integration.impl.TypeInjectionResolverFactoryImpl
- All Implemented Interfaces:
Serializable, TypeInjectionResolverFactory, VariableResolverFactory
public class TypeInjectionResolverFactoryImpl
extends MapVariableResolverFactory
implements TypeInjectionResolverFactory
- See Also:
-
Field Summary
Fields inherited from class MapVariableResolverFactory
variablesFields inherited from class BaseVariableResolverFactory
indexedVariableNames, indexedVariableResolvers, indexOffset, nextFactory, variableResolvers -
Constructor Summary
ConstructorsConstructorDescriptionTypeInjectionResolverFactoryImpl(Map<String, Object> variables) TypeInjectionResolverFactoryImpl(Map<String, Object> variables, boolean cachingSafe) TypeInjectionResolverFactoryImpl(Map<String, Object> variables, VariableResolverFactory nextFactory) TypeInjectionResolverFactoryImpl(ParserContext ctx, VariableResolverFactory nextVariableResolverFactory) -
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.Return a list of known variables inside the factory.Methods inherited from class MapVariableResolverFactory
addResolver, clear, getVariableResolver, isResolveable, isTargetMethods inherited from class BaseVariableResolverFactory
appendFactory, createIndexedVariable, createIndexedVariable, getIndexedVariableNames, getIndexedVariableResolver, getNextFactory, getVariableResolvers, insertFactory, isIndexedFactory, isNextResolveable, setIndexedVariableNames, setIndexedVariableResolver, setNextFactory, setTiltFlag, setVariableResolvers, tiltFlag, variableIndexOf
-
Constructor Details
-
TypeInjectionResolverFactoryImpl
public TypeInjectionResolverFactoryImpl() -
TypeInjectionResolverFactoryImpl
-
TypeInjectionResolverFactoryImpl
public TypeInjectionResolverFactoryImpl(ParserContext ctx, VariableResolverFactory nextVariableResolverFactory) -
TypeInjectionResolverFactoryImpl
public TypeInjectionResolverFactoryImpl(Map<String, Object> variables, VariableResolverFactory nextFactory) -
TypeInjectionResolverFactoryImpl
-
-
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
-
getKnownVariables
Description copied from interface:VariableResolverFactoryReturn 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.- Specified by:
getKnownVariablesin interfaceVariableResolverFactory- Overrides:
getKnownVariablesin classMapVariableResolverFactory- Returns:
- variables
-