@Test(expected = IllegalArgumentException.class) public void testParseMissingFirstType() { Utils.parseTypes(",java.lang.Object", getClass().getClassLoader()); }
static Set<Class<?>> parseTypes(final String types, final ClassLoader classLoader) { final Set<Class<?>> result = new LinkedHashSet<>(); for (final String token : StringUtils.splitByWholeSeparatorPreserveAllTokens(types, ",")) { try { result.add(ClassUtils.getClass(classLoader, token.trim().replace('/', '.'))); } catch (final ClassNotFoundException e) { throw new IllegalArgumentException(e); } } return result; }
Utils { static Set<Class<?>> parseTypes(final String types, final ClassLoader classLoader) { final Set<Class<?>> result = new LinkedHashSet<>(); for (final String token : StringUtils.splitByWholeSeparatorPreserveAllTokens(types, ",")) { try { result.add(ClassUtils.getClass(classLoader, token.trim().replace('/', '.'))); } catch (final ClassNotFoundException e) { throw new IllegalArgumentException(e); } } return result; } }
Utils { static Set<Class<?>> parseTypes(final String types, final ClassLoader classLoader) { final Set<Class<?>> result = new LinkedHashSet<>(); for (final String token : StringUtils.splitByWholeSeparatorPreserveAllTokens(types, ",")) { try { result.add(ClassUtils.getClass(classLoader, token.trim().replace('/', '.'))); } catch (final ClassNotFoundException e) { throw new IllegalArgumentException(e); } } return result; } private  Utils(); }
Utils { static Set<Class<?>> parseTypes(final String types, final ClassLoader classLoader) { final Set<Class<?>> result = new LinkedHashSet<>(); for (final String token : StringUtils.splitByWholeSeparatorPreserveAllTokens(types, ",")) { try { result.add(ClassUtils.getClass(classLoader, token.trim().replace('/', '.'))); } catch (final ClassNotFoundException e) { throw new IllegalArgumentException(e); } } return result; } private  Utils();  }
Utils { static Set<Class<?>> parseTypes(final String types, final ClassLoader classLoader) { final Set<Class<?>> result = new LinkedHashSet<>(); for (final String token : StringUtils.splitByWholeSeparatorPreserveAllTokens(types, ",")) { try { result.add(ClassUtils.getClass(classLoader, token.trim().replace('/', '.'))); } catch (final ClassNotFoundException e) { throw new IllegalArgumentException(e); } } return result; } private  Utils();   }