@Override public Type<?> getSuperBound() { return super.getSuperBound(); }
@Override public Type visitCapturedType(final Type t, final Void ignored) { return visit(t.getSuperBound()); } };
@Override public Type visitCapturedType(final Type t, final Void ignored) { return visit(t.getSuperBound()); } };
@Override public Type visitCapturedType(final Type t, final Void ignored) { return visit(t.getSuperBound()); } };
public boolean hasSuperBound() { return isWildcardType() && getSuperBound() != Bottom; }
private Type L(Type t) { while (t.isWildcardType()) { if (t.hasExtendsBound()) { return Type.Bottom; } else { t = t.getSuperBound(); } } return t; }
private Type L(Type t) { while (t.isWildcardType()) { if (t.hasExtendsBound()) { return Type.Bottom; } else { t = t.getSuperBound(); } } return t; }
private Type L(Type t) { while (t.isWildcardType()) { if (t.hasExtendsBound()) { return Type.Bottom; } else { t = t.getSuperBound(); } } return t; }
public boolean isUnbounded() { return isWildcardType() && getSuperBound() == Bottom && getExtendsBound() == Types.Object; }
public boolean isUnbounded() { return isWildcardType() && getSuperBound() == Bottom && getExtendsBound() == Types.Object; }
public boolean hasExtendsBound() { return isGenericParameter()/* && !Types.Object.equals(getExtendsBound())*/ || isWildcardType() && getSuperBound() == Bottom; }
@Override public Type visitWildcardType(final Type t, final Void ignored) { return t.hasExtendsBound() ? Type.Bottom : visit(t.getSuperBound()); }
@Override public Integer visitWildcardType(final Type t, final Void ignored) { int result = t.getKind().hashCode(); if (t.getSuperBound() != Type.Bottom) { result *= 127; result += visit(t.getSuperBound()); } else if (t.getExtendsBound() != Types.Object) { result *= 127; result += visit(t.getExtendsBound()); } return result; }
public boolean isUnbounded() { return isWildcardType() && getSuperBound() == Bottom && Types.Object.equals(getExtendsBound()); }
@Override public Type<?> visitWildcardType(final Type<?> type, final TypeBindings bindings) { final Type<?> oldLower = type.getSuperBound(); final Type<?> oldUpper = type.getExtendsBound(); final Type<?> newLower = visit(oldLower, bindings); final Type<?> newUpper = visit(oldUpper, bindings); if (newLower != oldLower || newUpper != oldUpper) { return new WildcardType<>(newUpper, newLower); } return type; }
@Override public Type<?> visitWildcardType(final Type<?> type, final TypeBindings bindings) { final Type<?> oldLower = type.getSuperBound(); final Type<?> oldUpper = type.getExtendsBound(); final Type<?> newLower = visit(oldLower, bindings); final Type<?> newUpper = visit(oldUpper, bindings); if (newLower != oldLower || newUpper != oldUpper) { return new WildcardType<>(newUpper, newLower); } return type; }
@Override public Type<?> visitWildcardType(final Type<?> type, final TypeBindings bindings) { final Type<?> oldLower = type.getSuperBound(); final Type<?> oldUpper = type.getExtendsBound(); final Type<?> newLower = visit(oldLower, bindings); final Type<?> newUpper = visit(oldUpper, bindings); if (newLower != oldLower || newUpper != oldUpper) { return new WildcardType<>(newUpper, newLower); } return type; }
private Type U(Type t) { while (t.isWildcardType()) { if (t.hasSuperBound()) { final Type lowerBound = t.getSuperBound(); if (lowerBound.hasExtendsBound()) { return lowerBound.getExtendsBound(); } return Types.Object; } t = t.getExtendsBound(); } return t; }
@Override public Type visitWildcardType(final Type t, final Void ignored) { if (t.hasSuperBound()) { final Type lowerBound = t.getSuperBound(); if (lowerBound.hasExtendsBound()) { return visit(lowerBound.getExtendsBound()); } return Types.Object; } else { return visit(t.getExtendsBound()); } }
@Override public Type visitWildcardType(final Type t, final Void ignored) { if (t.hasSuperBound()) { final Type lowerBound = t.getSuperBound(); if (lowerBound.hasExtendsBound()) { return visit(lowerBound.getExtendsBound()); } return Types.Object; } else { return visit(t.getExtendsBound()); } }