@Override public List<IOpenMethod> getCandidates() { return delegate.getCandidates(); }
private IOpenMethod getMember() { // as we have a group of overloaded methods, we need to take one it`s // member to get all common settings for the whole group return dispatcher.getCandidates().get(0); }
/** * Gets properties values from methods in group that will be * used to build dispatcher table by dimensional properties. * * @return properties values from tables in group. */ private List<ITableProperties> getMethodsProperties() { List<ITableProperties> propertiesValues = new ArrayList<>(); for (IOpenMethod method : dispatcher.getCandidates()) { propertiesValues.add(PropertiesHelper.getTableProperties(method)); } return propertiesValues; }
private IBindingContext createContextWithAuxiliaryMethods() { List<IOpenMethod> candidates = dispatcher.getCandidates(); final Map<MethodKey, IOpenMethod> auxiliaryMethods = new HashMap<>(candidates.size()); for (int i = 0; i < candidates.size(); i++) { IOpenMethod auxiliaryMethod = generateAuxiliaryMethod(candidates.get(i), i); auxiliaryMethods.put(new MethodKey(auxiliaryMethod), auxiliaryMethod); } return new InternalBindingContextDelegator(moduleContext, auxiliaryMethods); }
@Override public IMemberMetaInfo getInfo() { if (getCandidates().size() == 1) { return getCandidates().get(0).getInfo(); } return getDispatcherTable().getMember().getInfo(); }
private static String getTableUri(IOpenMethod method) { try { if (method instanceof IUriMember) { return ((IUriMember) method).getUri(); } else if (method instanceof OverloadedMethodsDispatcherTable) { return ((OverloadedMethodsDispatcherTable) method).getDispatcherTable().getUri(); } else if (method instanceof MatchingOpenMethodDispatcher) { MatchingOpenMethodDispatcher matchingOpenMethodDispatcher = (MatchingOpenMethodDispatcher) method; if (matchingOpenMethodDispatcher.getCandidates().size() == 1) { return getTableUri(matchingOpenMethodDispatcher.getCandidates().get(0)); } else { return matchingOpenMethodDispatcher.getDispatcherTable().getUri(); } } else if (method.getInfo() != null) { return method.getInfo().getSourceUrl(); } else { return null; } } catch (Exception e) { return null; } }