JCWildcard wc = (JCWildcard) enclTr; if (wc.getKind() == JCTree.Kind.EXTENDS_WILDCARD) { validateAnnotatedType(wc.getBound(), ((WildcardType)enclTy.unannotatedType()).getExtendsBound()); } else if (wc.getKind() == JCTree.Kind.SUPER_WILDCARD) { validateAnnotatedType(wc.getBound(), ((WildcardType)enclTy.unannotatedType()).getSuperBound());
JCWildcard wc = (JCWildcard) enclTr; if (wc.getKind() == JCTree.Kind.EXTENDS_WILDCARD) { validateAnnotatedType(wc.getBound(), ((WildcardType)enclTy.unannotatedType()).getExtendsBound()); } else if (wc.getKind() == JCTree.Kind.SUPER_WILDCARD) { validateAnnotatedType(wc.getBound(), ((WildcardType)enclTy.unannotatedType()).getSuperBound());
break; case EXTENDS: Si.bound = glb(Ti.getExtendsBound(), subst(Ui, A, S)); Si.lower = syms.botType; break;
break; case EXTENDS: Si.bound = glb(Ti.getExtendsBound(), subst(Ui, A, S)); Si.lower = syms.botType; break;
break; case EXTENDS: Si.bound = glb(Ti.getExtendsBound(), subst(Ui, A, S)); Si.lower = syms.botType; break;
break; case EXTENDS: Si.bound = glb(Ti.getExtendsBound(), subst(Ui, A, S)); Si.lower = syms.botType; break;
public List<Type> freshTypeVariables(List<Type> types) { ListBuffer<Type> result = new ListBuffer<>(); for (Type t : types) { if (t.hasTag(WILDCARD)) { t = t.unannotatedType(); Type bound = ((WildcardType)t).getExtendsBound(); if (bound == null) bound = syms.objectType; result.append(new CapturedType(capturedName, syms.noSymbol, bound, syms.botType, (WildcardType)t)); } else { result.append(t); } } return result.toList(); } // </editor-fold>
public List<Type> freshTypeVariables(List<Type> types) { ListBuffer<Type> result = new ListBuffer<>(); for (Type t : types) { if (t.hasTag(WILDCARD)) { t = t.unannotatedType(); Type bound = ((WildcardType)t).getExtendsBound(); if (bound == null) bound = syms.objectType; result.append(new CapturedType(capturedName, syms.noSymbol, bound, syms.botType, (WildcardType)t)); } else { result.append(t); } } return result.toList(); } // </editor-fold>
private List<Type> freshTypeVariables(List<Type> types) { ListBuffer<Type> result = lb(); for (Type t : types) { if (t.tag == WILDCARD) { Type bound = ((WildcardType)t).getExtendsBound(); if (bound == null) bound = syms.objectType; result.append(new CapturedType(capturedName, syms.noSymbol, bound, syms.botType, (WildcardType)t)); } else { result.append(t); } } return result.toList(); } // </editor-fold>
private List<Type> freshTypeVariables(List<Type> types) { ListBuffer<Type> result = lb(); for (Type t : types) { if (t.tag == WILDCARD) { Type bound = ((WildcardType)t).getExtendsBound(); if (bound == null) bound = syms.objectType; result.append(new CapturedType(capturedName, syms.noSymbol, bound, syms.botType, (WildcardType)t)); } else { result.append(t); } } return result.toList(); } // </editor-fold>
@Override public TypeMirror getExtendsBound() { return ((WildcardType)underlyingType).getExtendsBound(); } @Override
@Override public TypeMirror getExtendsBound() { return ((WildcardType)underlyingType).getExtendsBound(); } @Override
Type B(Type t) { while (t.hasTag(WILDCARD)) { WildcardType w = (WildcardType)t.unannotatedType(); t = high ? w.getExtendsBound() : w.getSuperBound(); if (t == null) { t = high ? syms.objectType : syms.botType; } } return t; } }
Type B(Type t) { while (t.hasTag(WILDCARD)) { WildcardType w = (WildcardType)t.unannotatedType(); t = high ? w.getExtendsBound() : w.getSuperBound(); if (t == null) { t = high ? syms.objectType : syms.botType; } } return t; } }
@Override public Void visitWildcardType(Type.WildcardType type, Void unused) { if (type.getSuperBound() != null) { type.getSuperBound().accept(this, null); } if (type.getExtendsBound() != null) { type.getExtendsBound().accept(this, null); } return null; }
@Override public Type visitWildcardType(WildcardType t, Void s) { Type bound = high ? t.getExtendsBound() : t.getSuperBound(); if (bound == null) bound = high ? syms.objectType : syms.botType; return bound; } }
@Override public Void visitWildcardType(Type.WildcardType type, Void unused) { if (type.getSuperBound() != null) { type.getSuperBound().accept(this, null); } if (type.getExtendsBound() != null) { type.getExtendsBound().accept(this, null); } return null; }