Lines Matching defs:formal
100 * Replaces type variables of the given {@code formal} type
134 * StringToIntMap.class and {@code formal} being the K from Map,
152 * @param formal the type where occurrences of the variables
156 public static Type resolve(Type actual, Type formal) {
157 if (formal instanceof Class) {
158 return formal;
160 if (formal instanceof GenericArrayType) {
161 Type comp = ((GenericArrayType) formal).getGenericComponentType();
167 if (formal instanceof ParameterizedType) {
168 ParameterizedType fpt = (ParameterizedType) formal;
173 if (formal instanceof WildcardType) {
174 WildcardType fwt = (WildcardType) formal;
179 if (formal instanceof TypeVariable) {
189 Type result = map.get(formal);
190 if (result == null || result.equals(formal)) {
191 return formal;
203 throw new IllegalArgumentException("Bad Type kind: " + formal.getClass());
207 * Replaces type variables of all formal types in the given array