public static int run(String[] args) throws Exception { try { ClassLoader cl = SecureLoader.getClassClassLoader(SchemaGenerator.class); if (cl == null) { cl = SecureLoader.getSystemClassLoader(); } return run(args, cl); } catch (Exception e) { System.err.println(e.getMessage()); return -1; } }
/** * Gets all the {@link Plugin}s discovered so far. * * <p>A plugins are enumerated when this method is called for the first time, by taking {@link * #classpaths} into account. That means "-cp plugin.jar" has to come before you specify options * to enable it. */ public List<Plugin> getAllPlugins() { if (allPlugins == null) { allPlugins = new ArrayList<Plugin>(); ClassLoader ucl = getUserClassLoader(SecureLoader.getClassClassLoader(getClass())); allPlugins.addAll(Arrays.asList(findServices(Plugin.class, ucl))); } return allPlugins; }