815N/A * Copyright (c) 2003, 2011, Oracle and/or its affiliates. All rights reserved. 0N/A * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 0N/A * This code is free software; you can redistribute it and/or modify it 0N/A * under the terms of the GNU General Public License version 2 only, as 553N/A * published by the Free Software Foundation. Oracle designates this 0N/A * particular file as subject to the "Classpath" exception as provided 553N/A * by Oracle in the LICENSE file that accompanied this code. 0N/A * This code is distributed in the hope that it will be useful, but WITHOUT 0N/A * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 0N/A * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 0N/A * version 2 for more details (a copy is included in the LICENSE file that 0N/A * accompanied this code). 0N/A * You should have received a copy of the GNU General Public License version 0N/A * 2 along with this work; if not, write to the Free Software Foundation, 0N/A * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. 553N/A * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA 553N/A * or visit www.oracle.com if you need additional information or have any 0N/A * Utility class containing various operations on types. 0N/A * <p>Unless other names are more illustrative, the following naming 0N/A * conventions should be observed in this file: 0N/A * <dd>If the first argument to an operation is a type, it should be named t.</dd> 0N/A * <dd>Similarly, if the second argument to an operation is a type, it should be named s.</dd> 0N/A * <dd>If an operations takes a list of types, the first should be named ts.</dd> 0N/A * <dd>A second list of types should be named ss.</dd> 580N/A * <p><b>This is NOT part of any supported API. 0N/A * If you write code that depends on this, you do so at your own risk. 0N/A * This code and its internal interfaces are subject to change or 0N/A * deletion without notice.</b> 0N/A // <editor-fold defaultstate="collapsed" desc="Instantiating"> 0N/A // <editor-fold defaultstate="collapsed" desc="upperBound"> 0N/A * The "rvalue conversion".<br> 0N/A * The upper bound of most types is the type 0N/A * itself. Wildcards, on the other hand have upper 0N/A * @return the upper bound of the given type 0N/A // <editor-fold defaultstate="collapsed" desc="lowerBound"> 0N/A * The "lvalue conversion".<br> 0N/A * The lower bound of most types is the type 0N/A * itself. Wildcards, on the other hand have upper 0N/A * @return the lower bound of the given type 0N/A // <editor-fold defaultstate="collapsed" desc="isUnbounded"> 0N/A * Checks that all the arguments to a class are unbounded 0N/A * wildcards or something else that doesn't make any restrictions 0N/A * on the arguments. If a class isUnbounded, a raw super- or 0N/A * subclass can be cast to it without a warning. 0N/A * @return true iff the given type is unbounded or raw 0N/A // <editor-fold defaultstate="collapsed" desc="asSub"> 0N/A * Return the least specific subtype of t that starts with symbol 0N/A * sym. If none exists, return null. The least specific subtype 0N/A * is determined as follows: 0N/A * <p>If there is exactly one parameterized instance of sym that is a 0N/A * subtype of t, that parameterized instance is returned.<br> 0N/A * Otherwise, if the plain type or raw type `sym' is a subtype of 0N/A * type t, the type `sym' itself is returned. Otherwise, null is 0N/A // The subtype of a raw type is raw 0N/A // Unbound type arguments default to ? 0N/A // <editor-fold defaultstate="collapsed" desc="isConvertible"> 0N/A // <editor-fold defaultstate="collapsed" desc="isSubtype"> 0N/A * Is t an unchecked subtype of s? 0N/A * Is t an unchecked subtype of s? 0N/A * Is t a subtype of s?<br> 0N/A * (not defined for Method and ForAll types) 990N/A case WILDCARD:
//we shouldn't be here - avoids crash (see 7034495) 0N/A // You're not allowed to write 0N/A // Vector<Object> vec = new Vector<String>(); 0N/A // But with wildcards you can write 0N/A // Vector<? extends Object> vec = new Vector<String>(); 0N/A // which means that subtype checking must be done 0N/A // here instead of same-type checking (via containsType). 0N/A //todo: test against origin needed? or replace with substitution? 0N/A * Is t a subtype of every type in given list `ts'?<br> 0N/A * (not defined for Method and ForAll types)<br> 0N/A * Allows unchecked conversions. 0N/A * Are corresponding elements of ts subtypes of ss? If lists are 0N/A * of different length, return false. 0N/A /*inlined: ts.nonEmpty() && ss.nonEmpty()*/ &&
0N/A /*inlined: ts.isEmpty() && ss.isEmpty();*/ 0N/A * Are corresponding elements of ts subtypes of ss, allowing 0N/A * unchecked conversions? If lists are of different length, 0N/A /*inlined: ts.nonEmpty() && ss.nonEmpty()*/ &&
0N/A /*inlined: ts.isEmpty() && ss.isEmpty();*/ 0N/A // <editor-fold defaultstate="collapsed" desc="isSuperType"> 0N/A * Is t a supertype of s? 0N/A // <editor-fold defaultstate="collapsed" desc="isSameType"> 0N/A * Are corresponding elements of the lists the same type? If 0N/A * lists are of different length, return false. 0N/A /*inlined: ts.nonEmpty() && ss.nonEmpty()*/ &&
0N/A /*inlined: ts.isEmpty() && ss.isEmpty();*/ 0N/A * Is t the same type as s? 560N/A //type-substitution does not preserve type-var types 560N/A //check that type var symbols and bounds are indeed the same 560N/A //special case for s == ? super X, where upper(s) = u 560N/A //check that u == t, where u has been set by Type.withTypeVar 0N/A // isSameType for methods does not take thrown 0N/A // exceptions into account! 0N/A // FIXME, this might be leftovers from before capture conversion 0N/A // <editor-fold defaultstate="collapsed" desc="fromUnknownFun"> 0N/A * A mapping that turns all unknown types in this type to fresh 0N/A * unknown variables. 0N/A // <editor-fold defaultstate="collapsed" desc="Contains Type"> 209N/A // We should check the new upper bound against any of the 209N/A // undetvar's lower bounds. 209N/A // We should check the new lower bound against any of the 209N/A // undetvar's lower bounds. 0N/A * Check if t contains s. 0N/A * <p>T contains S if: 0N/A * <p>{@code L(T) <: L(S) && U(S) <: U(T)} 0N/A * <p>This relation is only used by ClassType.isSubtype(), that 0N/A * <p>{@code C<S> <: C<T> if T contains S.} 0N/A * <p>Because of F-bounds, this relation can lead to infinite 0N/A * recursion. Thus we must somehow break that recursion. Notice 0N/A * that containsType() is only called from ClassType.isSubtype(). 0N/A * Since the arguments have already been checked against their 0N/A * <p>{@code U(S) <: U(T) if T is "super" bound (U(T) *is* the bound)} 0N/A * <p>{@code L(T) <: L(S) if T is "extends" bound (L(T) is bottom)} 788N/A// void debugContainsType(WildcardType t, Type s) { 788N/A// System.err.println(); 788N/A// System.err.format(" does %s contain %s?%n", t, s); 788N/A// System.err.format(" %s U(%s) <: U(%s) %s = %s%n", 788N/A// upperBound(s), s, t, U(t), 788N/A// || isSubtypeNoCapture(upperBound(s), U(t))); 788N/A// System.err.format(" %s L(%s) <: L(%s) %s = %s%n", 788N/A// L(t), t, s, lowerBound(s), 788N/A// || isSubtypeNoCapture(L(t), lowerBound(s))); 788N/A// System.err.println(); 788N/A// debugContainsType(t, s); 0N/A // <editor-fold defaultstate="collapsed" desc="isCastable"> 0N/A * Is t is castable to s?<br> 0N/A * s is assumed to be an erased type.<br> 0N/A * (not defined for Method and ForAll types). 0N/A // call recursively to reuse the above code 0N/A // Assume |a| <: |b| 0N/A // unrelated class types 0N/A // <editor-fold defaultstate="collapsed" desc="disjointTypes"> 0N/A * Two types or wildcards are considered disjoint if it can be 0N/A * proven that no type can be contained in both. It is 0N/A * conservative in that it is allowed to say that two types are 0N/A * not disjoint, even though they actually are. 0N/A * The type C<X> is castable to C<Y> exactly if X and Y are not 0N/A else // isSuperBound() 0N/A // <editor-fold defaultstate="collapsed" desc="lowerBoundArgtypes"> 0N/A * Returns the lower bounds of the formals of a method. 0N/A // <editor-fold defaultstate="collapsed" desc="notSoftSubtype"> 0N/A * This relation answers the question: is impossible that 0N/A * something of type `t' can be a subtype of `s'? This is 0N/A * different from the question "is `t' not a subtype of `s'?" 0N/A * when type variables are involved: Integer is not a subtype of T 0N/A * where <T extends Number> but it is not true that Integer cannot 0N/A * possibly be a subtype of T. 0N/A if (t == s)
return false;
0N/A // <editor-fold defaultstate="collapsed" desc="isReifiable"> 0N/A // <editor-fold defaultstate="collapsed" desc="Array Utils"> 0N/A * The element type of an array. 0N/A * Mapping to take element type of an arraytype 0N/A * The number of dimensions of an array type. 0N/A // <editor-fold defaultstate="collapsed" desc="asSuper"> 0N/A * Return the (most specific) base type of t that starts with the 0N/A * given symbol. If none exists, return null. 0N/A * @param sym a symbol 0N/A * Return the base type of t or any of its outer types that starts 0N/A * with the given symbol. If none exists, return null. 0N/A * @param sym a symbol 0N/A * Return the base type of t or any of its enclosing types that 0N/A * starts with the given symbol. If none exists, return null. 0N/A * @param sym a symbol 0N/A // <editor-fold defaultstate="collapsed" desc="memberType"> 0N/A * The type of given symbol, seen as a member of t. 0N/A * @param sym a symbol 133N/A //if t is an intersection type T = CT & I1 & I2 ... & In 133N/A //its supertypes CT, I1, ... In might contain wildcards 133N/A //so we need to go through capture conversion 0N/A // then base is a raw type 0N/A // <editor-fold defaultstate="collapsed" desc="isAssignable"> 0N/A * Is t assignable to s?<br> 0N/A * Equivalent to subtype except for constant values and raw 0N/A * (not defined for Method and ForAll types) 0N/A // <editor-fold defaultstate="collapsed" desc="erasure"> 0N/A * The erasure of t {@code |t|} -- the type that results when all 0N/A * type parameters in t are deleted. 0N/A return t;
/* fast special case */ 0N/A return t;
/*fast special case*/ 0N/A // <editor-fold defaultstate="collapsed" desc="makeCompoundType"> 0N/A * Make a compound type from non-empty list of types 0N/A * @param bounds the types from which the compound type is formed 0N/A * @param supertype is objectType if all bounds are interfaces, 0N/A // error condition, recover 0N/A * Same as {@link #makeCompoundType(List,Type)}, except that the 0N/A * second parameter is computed directly. Note that this might 0N/A * cause a symbol completion. Hence, this version of 0N/A * makeCompoundType may not be called during a classfile read. 0N/A * A convenience wrapper for {@link #makeCompoundType(List)}; the 0N/A * arguments are converted to a list and passed to the other 0N/A * method. Note that this might cause a symbol completion. 0N/A * Hence, this version of makeCompoundType may not be called 0N/A * during a classfile read. 0N/A // <editor-fold defaultstate="collapsed" desc="supertype"> 0N/A // A note on wildcards: there is no good way to 0N/A // determine a supertype for a super bounded wildcard. 0N/A // An interface has no superclass; its supertype is Object. 0N/A * The supertype is always a class type. If the type 0N/A * variable's bounds start with a class type, this is also 0N/A * the supertype. Otherwise, the supertype is 0N/A // <editor-fold defaultstate="collapsed" desc="interfaces"> 0N/A * Return the interfaces implemented by this class. 0N/A // If t.interfaces_field is null, then t must 0N/A // be a parameterized type (not to be confused 0N/A // with a generic type declaration). 0N/A // Parameterized type: List<String> 0N/A // Generic type declaration: class List<E> { ... } 0N/A // So t corresponds to List<String> and 0N/A // t.tsym.type corresponds to List<E>. 0N/A // The reason t must be parameterized type is 0N/A // that completion will happen as a side 0N/A // effect of calling 0N/A // ClassSymbol.getInterfaces. Since 0N/A // t.interfaces_field is null after 0N/A // completion, we can assume that t is not the 0N/A // <editor-fold defaultstate="collapsed" desc="isDerivedRaw"> 0N/A // <editor-fold defaultstate="collapsed" desc="setBounds"> 0N/A * Set the bounds field of the given type variable to reflect a 0N/A * (possibly multiple) list of bounds. 0N/A * @param t a type variable 0N/A * @param bounds the bounds, must be nonempty 0N/A * @param supertype is objectType if all bounds are interfaces, 0N/A * Same as {@link #setBounds(Type.TypeVar,List,Type)}, except that 562N/A * third parameter is computed directly, as follows: if all 562N/A * all bounds are interface types, the computed supertype is Object, 562N/A * otherwise the supertype is simply left null (in this case, the supertype 562N/A * is assumed to be the head of the bound list passed as second argument). 562N/A * Note that this check might cause a symbol completion. Hence, this version of 0N/A * setBounds may not be called during a classfile read. 0N/A // <editor-fold defaultstate="collapsed" desc="getBounds"> 0N/A * Return list of bounds of the given type variable. 0N/A // No superclass was given in bounds. 0N/A // In this case, supertype is Object, erasure is first interface. 0N/A // <editor-fold defaultstate="collapsed" desc="classBound"> 0N/A * If the given type is a (possibly selected) type variable, 0N/A * return the bounding class of this type, otherwise return the 0N/A // <editor-fold defaultstate="collapsed" desc="sub signature / override equivalence"> 0N/A * Returns true iff the first signature is a <em>sub 0N/A * signature</em> of the other. This is <b>not</b> an equivalence 0N/A * @see #overrideEquivalent(Type t, Type s) 0N/A * @param t first signature (possibly raw). 0N/A * @param s second signature (could be subjected to erasure). 0N/A * @return true if t is a sub signature of s. 0N/A * Returns true iff these signatures are related by <em>override 0N/A * equivalence</em>. This is the natural extension of 0N/A * isSubSignature to an equivalence relation. 0N/A * @see #isSubSignature(Type t, Type s) 0N/A * @param t a signature (possible raw, could be subjected to 0N/A * @param s a signature (possible raw, could be subjected to 0N/A * @return true if either argument is a sub signature of the other. 672N/A // <editor-fold defaultstate="collapsed" desc="Determining method implementation in given site"> 857N/A // <editor-fold defaultstate="collapsed" desc="compute transitive closure of all members in given site"> 1013N/A /** members closure visitor methods **/ 0N/A * Does t have the same arguments as s? It is assumed that both 0N/A * types are (possibly polymorphic) method types. Monomorphic 0N/A * method types "have the same arguments", if their argument lists 0N/A * are equal. Polymorphic method types "have the same arguments", 0N/A * if they have the same arguments after renaming all type 0N/A * variables of one to corresponding type variables in the other, 0N/A * where correspondence is by position in the type parameter list. 0N/A // <editor-fold defaultstate="collapsed" desc="subst"> 0N/A * Substitute all occurrences of a type in `from' with the 0N/A * corresponding type in `to' in 't'. Match lists `from' and `to' 0N/A * from the right: If lists have different length, discard leading 0N/A * elements of the longer list. 845N/A //perform alpha-renaming of free-variables in 't' 845N/A //if 'to' types contain variables that are free in 't' 0N/A // calculate new bounds 0N/A // create new type variables without bounds 0N/A // the new bounds should use the new type variables in place 0N/A // set the bounds of new type variables to the new bounds 211N/A // create new type variable without bounds 211N/A // the new bound should use the new type variable in place 0N/A // <editor-fold defaultstate="collapsed" desc="hasSameBounds"> 0N/A * Does t have the same bounds for quantified variables as s? 0N/A // <editor-fold defaultstate="collapsed" desc="newInstances"> 0N/A /** Create new vector of type variables from list of variables 0N/A * changing all recursive bounds from old to new list. 109N/A // <editor-fold defaultstate="collapsed" desc="createErrorType"> 0N/A // <editor-fold defaultstate="collapsed" desc="rank"> 0N/A * The rank of a class is the length of the longest path between 0N/A * the class and java.lang.Object in the class inheritance 0N/A * graph. Undefined for all but reference types. 237N/A * Helper method for generating a string representation of a given type 120N/A * accordingly to a given locale 237N/A * Helper method for generating a string representation of a given type 120N/A * accordingly to a given locale 0N/A // <editor-fold defaultstate="collapsed" desc="toString"> 0N/A * This toString is slightly more descriptive than the one on Type. 120N/A * @deprecated Types.toString(Type t, Locale l) provides better support 0N/A // No superclass was given in bounds. 0N/A // In this case, supertype is Object, erasure is first interface. 0N/A // <editor-fold defaultstate="collapsed" desc="Determining least upper bounds of types"> 0N/A * A cache for closures. 0N/A * <p>A closure is a list of all the supertypes and interfaces of 0N/A * a class or interface type, ordered by ClassSymbol.precedes 0N/A * (that is, subclasses come first, arbitrary but fixed 0N/A * Returns the closure of a class or interface type. 0N/A * Insert a type in a closure 0N/A * Form the union of two closures 0N/A * Intersect two closures 0N/A * Return the minimum type of a closure, a compound type if no 0N/A * unique minimum exists. 0N/A * Return the minimum types of a closure, suitable for computing 0N/A * compoundMin or glb. 0N/A * Return the least upper bound of pair of types. if the lub does 0N/A * not exist return null. 0N/A * Return the least upper bound (lub) of set of types. If the lub 0N/A * does not exist return the type of null (bottom). 0N/A // calculate lub(A[], B[]) 0N/A // if a primitive type is found, then return 0N/A // arraySuperType unless all the types are the 0N/A // lub(int[], B[]) is Cloneable & Serializable 0N/A // all the array types are the same, return one 0N/A // lub(int[], int[]) is int[] 0N/A // lub(A[], B[]) is lub(A, B)[] 0N/A // calculate lub(A, B) 895N/A //step 1 - compute erased candidate set (EC) 895N/A //step 2 - compute minimal erased candidate set (MEC) 895N/A //step 3 - for each element G in MEC, compute lci(Inv(G)) 895N/A //step 4 - let MEC be { G1, G2 ... Gn }, then we have that 895N/A //lub = lci(Inv(G1)) & lci(Inv(G2)) & ... & lci(Inv(Gn)) 0N/A // calculate lub(A, B[]) 0N/A // lub(A, B[]) is lub(A, arraySuperType) 0N/A // initialized lazily to avoid problems during compiler startup 0N/A synchronized (
this) {
0N/A // JLS 10.8: all arrays implement Cloneable and Serializable. 0N/A // <editor-fold defaultstate="collapsed" desc="Greatest lower bound"> 0N/A }
else {
// length > 1 0N/A // <editor-fold defaultstate="collapsed" desc="hashCode"> 0N/A * Compute a hash code on a type. 0N/A // <editor-fold defaultstate="collapsed" desc="Return-Type-Substitutable"> 0N/A * Does t have a result that is a subtype of the result type of s, 0N/A * suitable for covariant returns? It is assumed that both types 0N/A * are (possibly polymorphic) method types. Monomorphic method 0N/A * types are handled in the obvious way. Polymorphic method types 0N/A * require renaming all type variables of one to corresponding 0N/A * type variables in the other, where correspondence is by 0N/A * position in the type parameter list. */ 0N/A * Return-Type-Substitutable. 0N/A * Is t an appropriate return type in an overrider for a 0N/A * method that returns s? 0N/A // <editor-fold defaultstate="collapsed" desc="Box/unbox support"> 0N/A * Return the class that boxes the given primitive. 752N/A * Return the boxed type if 't' is primitive, otherwise return 't' itself. 0N/A * Return the primitive type corresponding to a boxed type. 0N/A // <editor-fold defaultstate="collapsed" desc="Capture conversion"> 971N/A * JLS 5.1.10 Capture Conversion: 0N/A * Let G name a generic type declaration with n formal type 0N/A * parameters A1 ... An with corresponding bounds U1 ... Un. There 0N/A * exists a capture conversion from G<T1 ... Tn> to G<S1 ... Sn>, 0N/A * where, for 1 <= i <= n: 0N/A * + If Ti is a wildcard type argument (4.5.1) of the form ? then 0N/A * Si is a fresh type variable whose upper bound is 0N/A * Ui[A1 := S1, ..., An := Sn] and whose lower bound is the null 0N/A * + If Ti is a wildcard type argument of the form ? extends Bi, 0N/A * then Si is a fresh type variable whose upper bound is 0N/A * glb(Bi, Ui[A1 := S1, ..., An := Sn]) and whose lower bound is 0N/A * the null type, where glb(V1,... ,Vm) is V1 & ... & Vm. It is 0N/A * a compile-time error if for any two classes (not interfaces) 0N/A * Vi and Vj,Vi is not a subclass of Vj or vice versa. 0N/A * + If Ti is a wildcard type argument of the form ? super Bi, 0N/A * then Si is a fresh type variable whose upper bound is 0N/A * Ui[A1 := S1, ..., An := Sn] and whose lower bound is Bi. 0N/A * + Otherwise, Si = Ti. 0N/A * Capture conversion on any type other than a parameterized type 0N/A * (4.5) acts as an identity conversion (5.1.1). Capture 0N/A * conversions never require a special action at run time and 0N/A * therefore never throw an exception at run time. 0N/A * Capture conversion is not applied recursively. 971N/A * Capture conversion as specified by the JLS. 0N/A // <editor-fold defaultstate="collapsed" desc="Internal utility methods"> 0N/A // We are casting from type $from$ to type $to$, which are 0N/A // non-final unrelated types. This method 0N/A // tries to reject a cast by transferring type parameters 0N/A // from $to$ to $from$ by common superinterfaces. 0N/A // The arguments to the supers could be unified here to 0N/A // get a more accurate analysis 0N/A // reject if there is a common method signature with 0N/A // incompatible return types. 0N/A // We are casting from type $from$ to type $to$, which are 0N/A // unrelated types one of which is final and the other of 0N/A // which is an interface. This method 0N/A // tries to reject a cast by transferring type parameters 0N/A // from the final class to the interface. 0N/A // reject if there is a common method signature with 0N/A // incompatible return types. 137N/A // <editor-fold defaultstate="collapsed" desc="adapt"> 0N/A * Adapt a type by computing a substitution which maps a source 0N/A * type to a target type. 0N/A * @param source the source type 0N/A * @param target the target type 0N/A * @param from the type variables of the computed substitution 0N/A * @param to the types of the computed substitution. 137N/A // Check to see if there is 137N/A // already a mapping for $source$, in which case 137N/A // the old mapping will be merged with the new 0N/A //if (t.tsym.type != t) 0N/A // Adapt should never fail calculating a mapping from 0N/A // t.tsym.type to t as there can be no merge problem. 0N/A * Rewrite all type variables (universal quantifiers) in the given 0N/A * type to wildcards (existential quantifiers). This is used to 0N/A * determine if a cast is allowed. For example, if high is true 0N/A * and {@code T <: Number}, then {@code List<T>} is rewritten to 0N/A * {@code List<? extends Number>}. Since {@code List<Integer> <: 0N/A * List<? extends Number>} a {@code List<T>} can be cast to {@code 0N/A * List<Integer>} with a warning. 0N/A * @param high if true return an upper bound; otherwise a lower 0N/A * @param rewriteTypeVars only rewrite captured wildcards if false; 0N/A * otherwise rewrite all type variables 0N/A * @return the type rewritten with wildcards (existential 0N/A * Create a wildcard with the given upper (extends) bound; create 0N/A * an unbounded wildcard if bound is Object. 0N/A * @param bound the upper bound 0N/A * @param formal the formal type parameter that will be 0N/A * substituted by the wildcard 0N/A * Create a wildcard with the given lower (super) bound; create an 0N/A * unbounded wildcard if bound is bottom (type of {@code null}). 0N/A * @param bound the lower bound 0N/A * @param formal the formal type parameter that will be 0N/A * substituted by the wildcard 0N/A * A wrapper for a type that allows use in sets. 0N/A // <editor-fold defaultstate="collapsed" desc="Visitors"> 0N/A * A default visitor for types. All visitor methods except 0N/A * visitType are implemented by delegating to visitType. Concrete 0N/A * subclasses must provide an implementation of visitType and can 0N/A * override other methods as needed. 0N/A * @param <R> the return type of the operation implemented by this 0N/A * visitor; use Void if no return type is needed. 0N/A * @param <S> the type of the second argument (the first being the 0N/A * type itself) of the operation implemented by this visitor; use 0N/A * Void if a second argument is not needed. 120N/A * A default visitor for symbols. All visitor methods except 120N/A * visitSymbol are implemented by delegating to visitSymbol. Concrete 120N/A * subclasses must provide an implementation of visitSymbol and can 120N/A * override other methods as needed. 120N/A * @param <R> the return type of the operation implemented by this 120N/A * visitor; use Void if no return type is needed. 120N/A * @param <S> the type of the second argument (the first being the 120N/A * symbol itself) of the operation implemented by this visitor; use 120N/A * Void if a second argument is not needed. 0N/A * A <em>simple</em> visitor for types. This visitor is simple as 0N/A * captured wildcards, for-all types (generic methods), and 0N/A * undetermined type variables (part of inference) are hidden. 0N/A * Captured wildcards are hidden by treating them as type 0N/A * variables and the rest are hidden by visiting their qtypes. 0N/A * @param <R> the return type of the operation implemented by this 0N/A * visitor; use Void if no return type is needed. 0N/A * @param <S> the type of the second argument (the first being the 0N/A * type itself) of the operation implemented by this visitor; use 0N/A * Void if a second argument is not needed. 0N/A * A plain relation on types. That is a 2-ary function on the 0N/A * form Type × Type → Boolean. 0N/A * <!-- In plain text: Type x Type -> Boolean --> 0N/A * A convenience visitor for implementing operations that only 0N/A * require one argument (the type itself), that is, unary 0N/A * @param <R> the return type of the operation implemented by this 0N/A * visitor; use Void if no return type is needed. 0N/A * A visitor for implementing a mapping from types to types. The 0N/A * default behavior of this class is to implement the identity 0N/A * mapping (mapping a type to itself). This can be overridden in 0N/A * @param <S> the type of the second argument (the first being the 0N/A * type itself) of this mapping; use Void if a second argument is 656N/A // <editor-fold defaultstate="collapsed" desc="Annotation support"> 656N/A else ;
// /* fail soft */ throw new AssertionError(levelName);