langtools/test/tools/javac/types/TypeHarness.java
changeset 20249 93f8eae31092
parent 16967 79d444669f3f
child 24396 3c36c6afcbca
equal deleted inserted replaced
20248:0c72984b7a4d 20249:93f8eae31092
   211         }
   211         }
   212     }
   212     }
   213 
   213 
   214     /** compute a type substitution on 't' given a list of type mappings */
   214     /** compute a type substitution on 't' given a list of type mappings */
   215     public Type subst(Type t, Mapping... maps) {
   215     public Type subst(Type t, Mapping... maps) {
   216         ListBuffer<Type> from = ListBuffer.lb();
   216         ListBuffer<Type> from = new ListBuffer<>();
   217         ListBuffer<Type> to = ListBuffer.lb();
   217         ListBuffer<Type> to = new ListBuffer<>();
   218         for (Mapping tm : maps) {
   218         for (Mapping tm : maps) {
   219             from.append(tm.from);
   219             from.append(tm.from);
   220             to.append(tm.to);
   220             to.append(tm.to);
   221         }
   221         }
   222         return types.subst(t, from.toList(), to.toList());
   222         return types.subst(t, from.toList(), to.toList());