PluginFactory { public Class<? extends T> getPluginClass(final String classpath) throws LoaderException { return getPluginClass(getClass().getClassLoader(), classpath); } PluginFactory(final String jarDirectory, final Class<T> typeParameterClass); Class<? extends T> getPluginClass(final String classpath); Class<? extends T> getPluginClass(final String jarName, final String classpath); T getPlugin(final String jarName, final String classpath); boolean checkPlugin(final String jarName, final String classpath); Path getPathForJar(final String jarName);  }
@Test public void testLoadingDefaultDeserializer() throws LoaderException { final String classPath = StringDeserializer.class.getName(); final PluginFactory<Deserializer> factory = new PluginFactory<>("/tmp", Deserializer.class); final Class<? extends Deserializer> pluginFilterClass = factory.getPluginClass(classPath); assertNotNull(pluginFilterClass); assertEquals("Has expected name", classPath, pluginFilterClass.getName()); }