protected boolean isVisible(final IResolvedExecutable executable, final IVisibilityHelper visibilityHelper) { return visibilityHelper.isVisible(executable.getDeclaration()); } }
@Override public String getResolvedErasureSignature() { return this.getDelegate().getResolvedErasureSignature(); } }
@Override public String getSimpleSignature() { return this.getDelegate().getSimpleSignature(); }
for(Executable declaredExecutable: declaredOperations) { if (!processed.contains(declaredExecutable)) { List<Executable> sameErasure = bySignature.apply(declaredExecutable.getResolvedErasureSignature()); if (sameErasure.size() > 1) { Multimap<String, Executable> perSignature = HashMultimap.create(sameErasure.size(), 2); outer: for(Executable executable: sameErasure) { for(LightweightTypeReference parameterType: executable.getResolvedParameterTypes()) { if (parameterType.isUnknown()) continue outer; perSignature.put(executable.getResolvedSignature(), executable); JvmExecutable executable = operationWithSameSignature.getDeclaration(); EObject otherSource = associations.getPrimarySourceElement(executable); if (flaggedOperations.add(otherSource)) { if (sameSignature.size() > 1) { error("Duplicate " + typeLabel(executable) + " " + operationWithSameSignature.getSimpleSignature() + " in type " + inferredType.getSimpleName(), otherSource, nameFeature(otherSource), DUPLICATE_METHOD); } else { error("The " + typeLabel(executable) + " " + operationWithSameSignature.getSimpleSignature() + " has the same erasure " + operationWithSameSignature.getResolvedErasureSignature() + " as another " + typeLabel(executable) + " in type " + inferredType.getSimpleName(), otherSource, nameFeature(otherSource), DUPLICATE_METHOD);
@Override public Iterable<? extends ResolvedParameter> getResolvedParameters() { Iterable<? extends ResolvedParameter> _xblockexpression = null; { if ((this.resolvedParameters == null)) { int _size = this.getDelegate().getDeclaration().getParameters().size(); final Function1<Integer, ResolvedParameterImpl> _function = (Integer i) -> { ParameterDeclaration _parameterDeclaration = this.getCompilationUnit().toParameterDeclaration(this.getDelegate().getDeclaration().getParameters().get((i).intValue())); TypeReference _typeReference = this.getCompilationUnit().toTypeReference(this.getDelegate().getResolvedParameterTypes().get((i).intValue())); return new ResolvedParameterImpl(_parameterDeclaration, _typeReference); }; this.resolvedParameters = IterableExtensions.<Integer, ResolvedParameterImpl>map(new ExclusiveRange(0, _size, true), _function); } _xblockexpression = this.resolvedParameters; } return _xblockexpression; }
@Override public Iterable<? extends TypeReference> getResolvedExceptionTypes() { final Function1<LightweightTypeReference, TypeReference> _function = (LightweightTypeReference it) -> { return this.getCompilationUnit().toTypeReference(it); }; return ListExtensions.<LightweightTypeReference, TypeReference>map(this.getDelegate().getResolvedExceptions(), _function); }
@Override public D getDeclaration() { MemberDeclaration _memberDeclaration = this.getCompilationUnit().toMemberDeclaration(this.getDelegate().getDeclaration()); return ((D) _memberDeclaration); }
protected boolean isCandidate(final LightweightTypeReference type, final IResolvedExecutable executable, final IVisibilityHelper visibilityHelper) { JvmDeclaredType declaringType = executable.getDeclaration().getDeclaringType(); if (((type.getType() != declaringType) && this.isVisible(executable, visibilityHelper))) { JvmExecutable rawExecutable = executable.getDeclaration(); if ((rawExecutable instanceof JvmOperation)) { JvmOperation operation = ((JvmOperation)rawExecutable); if ((operation.isFinal() || operation.isStatic())) { return false; } else { if (((type.getType() instanceof JvmGenericType) && ((JvmGenericType) type.getType()).isInterface())) { return (((declaringType instanceof JvmGenericType) && ((JvmGenericType) declaringType).isInterface()) && (!operation.isAbstract())); } else { return true; } } } else { return true; } } return false; }