Class MultiResolver
- java.lang.Object
-
- com.blackrook.expression.resolver.MultiResolver
-
- All Implemented Interfaces:
ExpressionFunctionResolver
public class MultiResolver extends Object implements ExpressionFunctionResolver
A resolver that is a combination of multiple resolvers.- Author:
- Matthew Tropiano
-
-
Constructor Summary
Constructors Constructor Description MultiResolver(ExpressionFunctionResolver... resolvers)
Creates a new MultiResolver using a list of resolvers.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
containsFunctionByName(String name)
Attempts to find if this resolver has a function by its calling name.ExpressionFunctionType
getFunctionByName(String name)
Attempts to resolve a pertinent function by its calling name.
-
-
-
Constructor Detail
-
MultiResolver
public MultiResolver(ExpressionFunctionResolver... resolvers)
Creates a new MultiResolver using a list of resolvers.- Parameters:
resolvers
- the list of resolvers.
-
-
Method Detail
-
containsFunctionByName
public boolean containsFunctionByName(String name)
Description copied from interface:ExpressionFunctionResolver
Attempts to find if this resolver has a function by its calling name.Names must be resolved case-insensitively!
If this returns
true
for a function name,ExpressionFunctionResolver.getFunctionByName(String)
must NOT return null if called with that name!- Specified by:
containsFunctionByName
in interfaceExpressionFunctionResolver
- Parameters:
name
- the name to find.- Returns:
- a corresponding function or null for no such function.
-
getFunctionByName
public ExpressionFunctionType getFunctionByName(String name)
Description copied from interface:ExpressionFunctionResolver
Attempts to resolve a pertinent function by its calling name.Names must be resolved case-insensitively!
If this returns a non-null for a function name,
ExpressionFunctionResolver.containsFunctionByName(String)
must NOT returnfalse
if called with that name!The same function must be returned if this is called again with the same name!
- Specified by:
getFunctionByName
in interfaceExpressionFunctionResolver
- Parameters:
name
- the name to resolve.- Returns:
- a corresponding function or null for no such function.
- See Also:
ExpressionFunctionResolver.containsFunctionByName(String)
-
-