@Override public Type visitWildcardType(final Type t, final Boolean recurse) { return erasure(upperBound(t), recurse); }
@Override public Type visitWildcardType(final Type t, final Boolean recurse) { return erasure(upperBound(t), recurse); }
@Override public Type visitWildcardType(final Type t, final Boolean recurse) { return erasure(upperBound(t), recurse); }
@Override public MemberInfo visitWildcardType(final Type<?> type, final MemberInfo member) { return asMemberOf(upperBound(type), member); }
@Override public MemberInfo visitWildcardType(final Type<?> type, final MemberInfo member) { return asMemberOf(upperBound(type), member); }
@Override public MemberInfo visitWildcardType(final Type<?> type, final MemberInfo member) { return asMemberOf(upperBound(type), member); }
@Override public Void visitWildcardType(final Type source, final Type target) throws AdaptFailure { if (source.hasExtendsBound()) { adaptRecursive(upperBound(source), upperBound(target)); } else if (source.hasSuperBound()) { adaptRecursive(lowerBound(source), lowerBound(target)); } return null; }
@Override public Boolean visitWildcardType(final Type type, final Type parameter) { return parameter.hasSuperBound() && !parameter.hasExtendsBound() && visit(type, upperBound(parameter)); }
@Override public Boolean visitWildcardType(final Type type, final Type parameter) { return parameter.hasSuperBound() && !parameter.hasExtendsBound() && visit(type, upperBound(parameter)); }
@Override public Void visitWildcardType(final Type source, final Type target) throws AdaptFailure { if (source.hasExtendsBound()) { adaptRecursive(upperBound(source), upperBound(target)); } else if (source.hasSuperBound()) { adaptRecursive(lowerBound(source), lowerBound(target)); } return null; }
@Override public Boolean visitWildcardType(final Type type, final Type parameter) { return parameter.hasSuperBound() && !parameter.hasExtendsBound() && visit(type, upperBound(parameter)); }
@Override public Void visitWildcardType(final Type source, final Type target) throws AdaptFailure { if (source.hasExtendsBound()) { adaptRecursive(upperBound(source), upperBound(target)); } else if (source.hasSuperBound()) { adaptRecursive(lowerBound(source), lowerBound(target)); } return null; }
public static Type elementType(final Type t) { if (t.isArray()) { return t.getElementType(); } if (t.isWildcardType()) { return elementType(upperBound(t)); } return null; }
public static Type elementType(final Type t) { if (t.isArray()) { return t.getElementType(); } if (t.isWildcardType()) { return elementType(upperBound(t)); } return null; }
public static Type elementType(final Type t) { if (t.isArray()) { return t.getElementType(); } if (t.isWildcardType()) { return elementType(upperBound(t)); } return null; }
@Override public Void visitTypeParameter(final Type source, final Type target) throws AdaptFailure { // Check to see if there is // already a mapping for $source$, in which case // the old mapping will be merged with the new Type val = mapping.get(source); if (val != null) { if (val.hasSuperBound() && target.hasSuperBound()) { val = isSubtype(lowerBound(val), lowerBound(target)) ? target : val; } else if (val.hasExtendsBound() && target.hasExtendsBound()) { val = isSubtype(upperBound(val), upperBound(target)) ? val : target; } else if (!isSameType(val, target)) { throw new AdaptFailure(); } } else { val = target; from.append(source); to.append(target); } mapping.put(source, val); return null; }
@Override public Void visitTypeParameter(final Type source, final Type target) throws AdaptFailure { // Check to see if there is // already a mapping for $source$, in which case // the old mapping will be merged with the new Type val = mapping.get(source); if (val != null) { if (val.hasSuperBound() && target.hasSuperBound()) { val = isSubtype(lowerBound(val), lowerBound(target)) ? target : val; } else if (val.hasExtendsBound() && target.hasExtendsBound()) { val = isSubtype(upperBound(val), upperBound(target)) ? val : target; } else if (!isSameType(val, target)) { throw new AdaptFailure(); } } else { val = target; from.append(source); to.append(target); } mapping.put(source, val); return null; }
@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)))); } };