Package org.openl.rules.types.impl
Class MatchingOpenMethodDispatcher
- java.lang.Object
-
- org.openl.rules.types.OpenMethodDispatcher
-
- org.openl.rules.types.impl.MatchingOpenMethodDispatcher
-
- All Implemented Interfaces:
INamedThing,IMethodCaller,Invokable,IOpenMember,IOpenMethod,IOpenMethodHeader
- Direct Known Subclasses:
AbstractMatchingOpenMethodDispatcherWrapper,OverloadedMethodsDispatcherTable
public class MatchingOpenMethodDispatcher extends OpenMethodDispatcher
Represents group of methods(rules) overloaded by dimension properties. TODO: refactor invoke functionality. UseRulesMethodInvoker.
-
-
Field Summary
-
Fields inherited from interface org.openl.base.INamedThing
EMPTY, LONG, REGULAR, SHORT
-
Fields inherited from interface org.openl.types.IOpenMethod
EMPTY_ARRAY
-
-
Constructor Summary
Constructors Constructor Description MatchingOpenMethodDispatcher()MatchingOpenMethodDispatcher(IOpenMethod method, XlsModuleOpenClass xlsModuleOpenClass)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddMethod(IOpenMethod candidate)Try to add method as overloaded version of decorated method.protected IOpenMethodfindMatchingMethod(List<IOpenMethod> candidates, IRuntimeContext context)Resolve best matching method to invoke.List<IOpenMethod>getCandidates()IOpenMethodgetDecisionTableOpenMethod()TableSyntaxNodegetDispatcherTable()IMemberMetaInfogetInfo()Getsnull.voidsetDecisionTableOpenMethod(IOpenMethod decisionTableOpenMethod)-
Methods inherited from class org.openl.rules.types.OpenMethodDispatcher
findMatchingMethod, getDeclaringClass, getDisplayName, getMethod, getName, getSignature, getTargetMethod, getType, invoke, isConstructor, isStatic
-
-
-
-
Constructor Detail
-
MatchingOpenMethodDispatcher
public MatchingOpenMethodDispatcher()
-
MatchingOpenMethodDispatcher
public MatchingOpenMethodDispatcher(IOpenMethod method, XlsModuleOpenClass xlsModuleOpenClass)
-
-
Method Detail
-
getDecisionTableOpenMethod
public IOpenMethod getDecisionTableOpenMethod()
-
setDecisionTableOpenMethod
public void setDecisionTableOpenMethod(IOpenMethod decisionTableOpenMethod)
-
addMethod
public void addMethod(IOpenMethod candidate)
Description copied from class:OpenMethodDispatcherTry to add method as overloaded version of decorated method.- Overrides:
addMethodin classOpenMethodDispatcher- Parameters:
candidate- method to add
-
findMatchingMethod
protected IOpenMethod findMatchingMethod(List<IOpenMethod> candidates, IRuntimeContext context)
Description copied from class:OpenMethodDispatcherResolve best matching method to invoke.- Specified by:
findMatchingMethodin classOpenMethodDispatcher- Parameters:
candidates- list of candidatescontext- runtime context- Returns:
- method to invoke
-
getDispatcherTable
public TableSyntaxNode getDispatcherTable()
- Specified by:
getDispatcherTablein classOpenMethodDispatcher
-
getInfo
public IMemberMetaInfo getInfo()
Description copied from class:OpenMethodDispatcherGetsnull. The decorator hasn't info about overloaded methods.- Specified by:
getInfoin interfaceIOpenMember- Overrides:
getInfoin classOpenMethodDispatcher
-
getCandidates
public List<IOpenMethod> getCandidates()
- Overrides:
getCandidatesin classOpenMethodDispatcher
-
-