public static boolean contains(List<Type> ts, Type t) { for (List<Type> l = ts; l.tail != null /*inlined: l.nonEmpty()*/; l = l.tail) if (l.head.contains(t)) return true; return false; }
public static boolean contains(List<Type> ts, Type t) { for (List<Type> l = ts; l.tail != null /*inlined: l.nonEmpty()*/; l = l.tail) if (l.head.contains(t)) return true; return false; }
@Override public boolean contains(Type t) { return kind != UNBOUND && type.contains(t); }
/** Does this type contain an occurrence of some type in 'ts'? */ public boolean containsAny(List<Type> ts) { for (Type t : ts) if (this.contains(t)) return true; return false; }
public static boolean contains(List<Type> ts, Type t) { for (List<Type> l = ts; l.tail != null /*inlined: l.nonEmpty()*/; l = l.tail) if (l.head.contains(t)) return true; return false; }
/** Does this type contain an occurrence of some type in 'ts'? */ public boolean containsAny(List<Type> ts) { for (Type t : ts) if (this.contains(t)) return true; return false; }
public static boolean contains(List<Type> ts, Type t) { for (List<Type> l = ts; l.tail != null /*inlined: l.nonEmpty()*/; l = l.tail) if (l.head.contains(t)) return true; return false; }
public boolean contains(Type elem) { return elem == this || contains(argtypes, elem) || restype.contains(elem); }
/** Does this type contain an occurrence of some type in `elems'? */ public boolean containsSome(List<Type> ts) { for (List<Type> l = ts; l.nonEmpty(); l = l.tail) if (this.contains(ts.head)) return true; return false; }
/** Does this type contain an occurrence of some type in `elems'? */ public boolean containsSome(List<Type> ts) { for (List<Type> l = ts; l.nonEmpty(); l = l.tail) if (this.contains(ts.head)) return true; return false; }
public boolean contains(TypeMirror t1, TypeMirror t2) { validateTypeNotIn(t1, EXEC_OR_PKG); validateTypeNotIn(t2, EXEC_OR_PKG); return ((Type) t1).contains((Type) t2); }
public boolean contains(TypeMirror t1, TypeMirror t2) { validateTypeNotIn(t1, EXEC_OR_PKG); validateTypeNotIn(t2, EXEC_OR_PKG); return ((Type) t1).contains((Type) t2); }
@Override public Type visitTypeVar(TypeVar t, Void s) { if (rewriteTypeVars) { Type bound = t.bound.contains(t) ? erasure(t.bound) : visit(t.bound); return rewriteAsWildcardType(bound, t, EXTENDS); } else { return t; } }
@Override public Type visitCapturedType(CapturedType t, Void s) { Type w_bound = t.wildcard.type; Type bound = w_bound.contains(t) ? erasure(w_bound) : visit(w_bound); return rewriteAsWildcardType(visit(bound), t.wildcard.bound, t.wildcard.kind); }
public boolean contains(Type elem) { return elem == this || (isParameterized() && (getEnclosingType().contains(elem) || contains(getTypeArguments(), elem))); }
public boolean contains(Type elem) { return elem == this || (isParameterized() && (getEnclosingType().contains(elem) || contains(getTypeArguments(), elem))); }
/** * Returns a list of free variables in a given type */ final List<Type> freeVarsIn(Type t) { ListBuffer<Type> buf = new ListBuffer<>(); for (Type iv : inferenceVars()) { if (t.contains(iv)) { buf.add(iv); } } return buf.toList(); }
/** * Returns a list of free variables in a given type */ final List<Type> freeVarsIn(Type t) { ListBuffer<Type> buf = new ListBuffer<>(); for (Type iv : inferenceVars()) { if (t.contains(iv)) { buf.add(iv); } } return buf.toList(); }