public Set<TypeReference> getDelegatedInterfaces(final MemberDeclaration delegate) { Set<TypeReference> _xblockexpression = null; { final Set<TypeReference> interfacesOfDeclaringType = this.getImplementedInterfaces(this.context.newSelfTypeReference(delegate.getDeclaringType())); final Set<TypeReference> listedInterfaces = this.listedInterfaces(delegate); final Set<TypeReference> availableInterfaces = this.getImplementedInterfaces(this.getType(delegate)); final Function1<TypeReference, Boolean> _function = (TypeReference iface) -> { return Boolean.valueOf((interfacesOfDeclaringType.contains(iface) && (listedInterfaces.isEmpty() || IterableExtensions.<TypeReference>exists(listedInterfaces, ((Function1<TypeReference, Boolean>) (TypeReference it) -> { return Boolean.valueOf(iface.isAssignableFrom(it)); }))))); }; _xblockexpression = IterableExtensions.<TypeReference>toSet(IterableExtensions.<TypeReference>filter(availableInterfaces, _function)); } return _xblockexpression; }
final Set<TypeReference> availableInterfaces = this.getImplementedInterfaces(this.getType(delegate)); final Set<TypeReference> listedInterfaces = this.listedInterfaces(delegate); boolean valid = true; if (_not) { StringConcatenation _builder = new StringConcatenation(); String _simpleName = this.getType(delegate).getSimpleName(); _builder.append(_simpleName); _builder.append(" does not implement "); String _simpleName = this.getType(delegate).getSimpleName(); _builder.append(_simpleName); _builder.append(" and ");
public boolean hasValidType(final MemberDeclaration it) { boolean _xifexpression = false; if (((this.getType(it) == null) || this.getType(it).isInferred())) { boolean _xblockexpression = false; { this.context.addError(it, "Cannot use inferred types on delegates"); _xblockexpression = false; } _xifexpression = _xblockexpression; } else { _xifexpression = true; } return _xifexpression; }