org.mvel2.ast
Class Proto.InvokationContextFactory

java.lang.Object
  extended by org.mvel2.integration.impl.BaseVariableResolverFactory
      extended by org.mvel2.integration.impl.MapVariableResolverFactory
          extended by org.mvel2.ast.Proto.InvokationContextFactory
All Implemented Interfaces:
java.io.Serializable, VariableResolverFactory
Enclosing class:
Proto

public class Proto.InvokationContextFactory
extends MapVariableResolverFactory

See Also:
Serialized Form

Field Summary
 
Fields inherited from class org.mvel2.integration.impl.MapVariableResolverFactory
variables
 
Fields inherited from class org.mvel2.integration.impl.BaseVariableResolverFactory
indexedVariableNames, indexedVariableResolvers, indexOffset, nextFactory, variableResolvers
 
Constructor Summary
Proto.InvokationContextFactory(VariableResolverFactory next, VariableResolverFactory protoContext)
           
 
Method Summary
 VariableResolver createVariable(java.lang.String name, java.lang.Object value)
          Creates a new variable.
 VariableResolver createVariable(java.lang.String name, java.lang.Object value, java.lang.Class<?> type)
          Creates a new variable, and assigns a static type.
 VariableResolver getVariableResolver(java.lang.String name)
          Return a variable resolver for the specified variable name.
 boolean isIndexedFactory()
           
 boolean isResolveable(java.lang.String name)
          Determines whether or not the variable is resolver in the chain of factories.
 boolean isTarget(java.lang.String name)
          Deterimines 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, getKnownVariables
 
Methods inherited from class org.mvel2.integration.impl.BaseVariableResolverFactory
appendFactory, createIndexedVariable, createIndexedVariable, getIndexedVariableNames, getIndexedVariableResolver, getNextFactory, getVariableResolvers, insertFactory, isNextResolveable, setIndexedVariableNames, setIndexedVariableResolver, setNextFactory, setVariableResolvers, variableIndexOf
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Proto.InvokationContextFactory

public Proto.InvokationContextFactory(VariableResolverFactory next,
                                      VariableResolverFactory protoContext)
Method Detail

createVariable

public VariableResolver createVariable(java.lang.String name,
                                       java.lang.Object value)
Description copied from interface: VariableResolverFactory
Creates a new variable. This probably doesn't need to be implemented in most scenarios. This is used for variable assignment.

Specified by:
createVariable in interface VariableResolverFactory
Overrides:
createVariable in class MapVariableResolverFactory
Parameters:
name - - name of the variable being created
value - - value of the variable
Returns:
instance of the variable resolver associated with the variable

createVariable

public VariableResolver createVariable(java.lang.String name,
                                       java.lang.Object value,
                                       java.lang.Class<?> type)
Description copied from interface: VariableResolverFactory
Creates a new variable, and assigns a static type. It is expected the underlying factory and resolver will enforce this.

Specified by:
createVariable in interface VariableResolverFactory
Overrides:
createVariable in class MapVariableResolverFactory
Parameters:
name - - name of the variable being created
value - - value of the variable
type - - the static type
Returns:
instance of the variable resolver associated with the variable

getVariableResolver

public VariableResolver getVariableResolver(java.lang.String name)
Description copied from interface: VariableResolverFactory
Return a variable resolver for the specified variable name. This method is expected to traverse the heirarchy of ResolverFactories.

Specified by:
getVariableResolver in interface VariableResolverFactory
Overrides:
getVariableResolver in class MapVariableResolverFactory
Parameters:
name - - variable name
Returns:
- instance of the VariableResolver for the specified variable

isTarget

public boolean isTarget(java.lang.String name)
Description copied from interface: VariableResolverFactory
Deterimines whether or not the current VariableResolverFactory is the physical target for the actual variable.

Specified by:
isTarget in interface VariableResolverFactory
Overrides:
isTarget in class MapVariableResolverFactory
Parameters:
name - - variable name
Returns:
- boolean indicating whether or not factory is the physical target

isResolveable

public boolean isResolveable(java.lang.String name)
Description copied from interface: VariableResolverFactory
Determines whether or not the variable is resolver in the chain of factories.

Specified by:
isResolveable in interface VariableResolverFactory
Overrides:
isResolveable in class MapVariableResolverFactory
Parameters:
name - - variable name
Returns:
- boolean

isIndexedFactory

public boolean isIndexedFactory()
Specified by:
isIndexedFactory in interface VariableResolverFactory
Overrides:
isIndexedFactory in class BaseVariableResolverFactory


Copyright © 2010. All Rights Reserved.