code: public static <T extends Item> List<T> fromNameList(ItemGroup context, @Nonnull String list, @Nonnull Class<T> type) {
          final Jenkins jenkins = Jenkins.getInstance();
          
          List<T> r = new ArrayList<>();
          if (jenkins == null) {
              return r;
          }
          
          StringTokenizer tokens = new StringTokenizer(list,",");
          while(tokens.hasMoreTokens()) {
              String fullName = tokens.nextToken().trim();
              if (StringUtils.isNotEmpty(fullName)) {
                  T item = jenkins.getItem(fullName, context, type);
                  if(item!=null)
                      r.add(item);
              }
          }
          return r;
      }
docs: Does the opposite of {@link #toNameList(Collection)}.