Home | History | Annotate | Download | only in types

Lines Matching defs:mapping

187     Map<TyVarSymbol, Type> mapping = new LinkedHashMap<>();
190 addInstantiation(env, mapping, s);
194 simples.add(instantiate(env, mapping, s.sym()));
204 /** Add the type arguments of a simple class type to a type mapping. */
207 Map<TyVarSymbol, Type> mapping,
213 mapping.put(sym, null);
225 mapping.put(sym, argument);
229 /** Instantiate a simple class type for the given symbol, and with the given type mapping. */
232 Map<TyVarSymbol, Type> mapping,
236 if (!mapping.containsKey(sym)) {
240 Type arg = instantiate(mapping, mapping.get(sym));
251 /** Instantiates a type argument using the given mapping. */
252 private static Type instantiate(Map<TyVarSymbol, Type> mapping, Type type) {
258 return instantiateWildTy(mapping, (WildTy) type);
263 return instantiateClassTy(mapping, (ClassTy) type);
266 Type elem = instantiate(mapping, arrayTy.elementType());
270 if (mapping.containsKey(tyVar.sym())) {
271 return instantiate(mapping, mapping.get(tyVar.sym()));
279 private static Type instantiateWildTy(Map<TyVarSymbol, Type> mapping, WildTy type) {
284 return new Type.WildUpperBoundedTy(instantiate(mapping, type.bound()), type.annotations());
286 return new Type.WildLowerBoundedTy(instantiate(mapping, type.bound()), type.annotations());
292 private static Type instantiateClassTy(Map<TyVarSymbol, Type> mapping, ClassTy type) {
297 args.add(instantiate(mapping, arg));