protected IConstructorLinkingCandidate doGetConstructor(XConstructorCall constructorCall) { return (IConstructorLinkingCandidate) basicGetLinkingMap().get(constructorCall); }
protected IFeatureLinkingCandidate doGetFeature(XAbstractFeatureCall featureCall) { return (IFeatureLinkingCandidate) basicGetLinkingMap().get(featureCall); }
@Override public Collection<IAmbiguousLinkingCandidate> getAmbiguousLinkingCandidates() { Collection<?> rawResult = Collections2.filter(basicGetLinkingMap().values(), new Predicate<IApplicableCandidate>() { @Override public boolean apply(/* @Nullable */ IApplicableCandidate input) { if (input == null) throw new IllegalArgumentException(); if (input instanceof IAmbiguousLinkingCandidate) return true; return false; } }); @SuppressWarnings("unchecked") // cast is safe Collection<IAmbiguousLinkingCandidate> result = (Collection<IAmbiguousLinkingCandidate>) rawResult; return result; }
@Override public Collection<ILinkingCandidate> getFollowUpErrors() { Collection<?> rawResult = Collections2.filter(basicGetLinkingMap().values(), new Predicate<IApplicableCandidate>() { @Override public boolean apply(/* @Nullable */ IApplicableCandidate input) { if (input == null) throw new IllegalArgumentException(); if (input instanceof FollowUpError) return true; return false; } }); @SuppressWarnings("unchecked") // cast is safe Collection<ILinkingCandidate> result = (Collection<ILinkingCandidate>) rawResult; return result; }
protected List<LightweightTypeReference> doGetActualTypeArguments(XExpression expression) { if (expression == null || expression.eClass() == XbasePackage.Literals.XCLOSURE) { return Collections.emptyList(); } ILinkingCandidate result = (ILinkingCandidate) basicGetLinkingMap().get(expression); if (result != null) { return result.getTypeArguments(); } return Collections.emptyList(); }