public Boolean visitType(final Type t, final Type s) { if (t.isGenericParameter()) { return isSubtypeNoCapture(t.getExtendsBound(), s); } return Boolean.FALSE; }
public Boolean visitType(final Type t, final Type s) { if (t.isGenericParameter()) { return isSubtypeNoCapture(t.getExtendsBound(), s); } return Boolean.FALSE; }
public Boolean visitType(final Type t, final Type s) { if (t.isGenericParameter()) { return isSubtypeNoCapture(t.getExtendsBound(), s); } return Boolean.FALSE; }
@Override public Boolean visitWildcardType(final Type t, final Type p) { return isSameWildcard(t, p) || isCaptureOf(p, t) || ((t.hasExtendsBound() || isSubtypeNoCapture(L(t), lowerBound(p))) && (t.hasSuperBound() || isSubtypeNoCapture(upperBound(p), U(t)))); } };
@Override public Boolean visitWildcardType(final Type t, final Type p) { return isSameWildcard(t, p) || isCaptureOf(p, t) || ((t.hasExtendsBound() || isSubtypeNoCapture(L(t), lowerBound(p))) && (t.hasSuperBound() || isSubtypeNoCapture(upperBound(p), U(t)))); } };
@Override public Boolean visitWildcardType(final Type t, final Type p) { return isSameWildcard(t, p) || isCaptureOf(p, t) || ((t.hasExtendsBound() || isSubtypeNoCapture(L(t), lowerBound(p))) && (t.hasSuperBound() || isSubtypeNoCapture(upperBound(p), U(t)))); } };
@Override public Boolean visitArrayType(final Type t, final Type s) { final Type elementType = t.getElementType(); if (elementType.isPrimitive()) { return isSameType(elementType, elementType(s)); } return isSubtypeNoCapture(elementType, elementType(s)); } };
@Override public Boolean visitArrayType(final Type t, final Type s) { final Type elementType = t.getElementType(); if (elementType.isPrimitive()) { return isSameType(elementType, elementType(s)); } return isSubtypeNoCapture(elementType, elementType(s)); } };
@Override public Boolean visitArrayType(final Type t, final Type s) { final Type elementType = t.getElementType(); if (elementType.isPrimitive()) { return isSameType(elementType, elementType(s)); } return isSubtypeNoCapture(elementType, elementType(s)); } };
return null; else if (isSubtypeNoCapture(t, p)) { return t; else if (isSubtypeNoCapture(p, t)) { return p;
return null; else if (isSubtypeNoCapture(t, p)) { return t; else if (isSubtypeNoCapture(p, t)) { return p;
return null; else if (isSubtypeNoCapture(t, p)) { return t; else if (isSubtypeNoCapture(p, t)) { return p;
private static ImmutableList<Type<?>> closureMin(ImmutableList<Type<?>> cl) { final ListBuffer<Type<?>> classes = lb(); final ListBuffer<Type<?>> interfaces = lb(); while (!cl.isEmpty()) { final Type current = cl.head; if (current.isInterface()) { interfaces.append(current); } else { classes.append(current); } final ListBuffer<Type<?>> candidates = lb(); for (final Type t : cl.tail) { if (!isSubtypeNoCapture(current, t)) { candidates.append(t); } } cl = candidates.toList(); } return classes.appendList(interfaces).toList(); }
private static ImmutableList<Type<?>> closureMin(ImmutableList<Type<?>> cl) { final ListBuffer<Type<?>> classes = lb(); final ListBuffer<Type<?>> interfaces = lb(); while (!cl.isEmpty()) { final Type current = cl.head; if (current.isInterface()) { interfaces.append(current); } else { classes.append(current); } final ListBuffer<Type<?>> candidates = lb(); for (final Type t : cl.tail) { if (!isSubtypeNoCapture(current, t)) { candidates.append(t); } } cl = candidates.toList(); } return classes.appendList(interfaces).toList(); }
private static ImmutableList<Type<?>> closureMin(ImmutableList<Type<?>> cl) { final ListBuffer<Type<?>> classes = lb(); final ListBuffer<Type<?>> interfaces = lb(); while (!cl.isEmpty()) { final Type current = cl.head; if (current.isInterface()) { interfaces.append(current); } else { classes.append(current); } final ListBuffer<Type<?>> candidates = lb(); for (final Type t : cl.tail) { if (!isSubtypeNoCapture(current, t)) { candidates.append(t); } } cl = candidates.toList(); } return classes.appendList(interfaces).toList(); }
&& isSubtypeNoCapture(asSuper.getDeclaringType(), s.getDeclaringType());
&& isSubtypeNoCapture(asSuper.getDeclaringType(), s.getDeclaringType());
&& isSubtypeNoCapture(asSuper.getDeclaringType(), s.getDeclaringType());