/** * Return an array of Class objects of all known service implementors of the * specified class name(as resolved by the current thread's context class * loader). */ public static Class[] getImplementorClasses(String serviceName) { return getImplementorClasses(serviceName, null); }
/** * Return an array of Strings of class names of all known service * implementors of the specified interface or class. */ public static String[] getImplementors(Class serviceClass) { return getImplementors(serviceClass, null); }
/** * Return an array of Strings of class names of all known service * implementors of the specified class name, as resolved by the specified * {@link ClassLoader}. */ public static String[] getImplementors(String serviceName, ClassLoader loader) { if (loader == null) loader = (ClassLoader) AccessController.doPrivileged( J2DoPrivHelper.getContextClassLoaderAction()); try { Set resourceList = new TreeSet(); Enumeration resources = (Enumeration) AccessController.doPrivileged( J2DoPrivHelper.getResourcesAction(loader, PREFIX + serviceName)); while (resources.hasMoreElements()) addResources((URL) resources.nextElement(), resourceList); return (String[]) resourceList.toArray(new String[resourceList .size()]); } catch (Exception e) { // silently swallow all exceptions. return new String[0]; } }
/** * Return an array of Strings of class names of all known service * implementors of the specified class name, as resolved by the specified * {@link ClassLoader}. */ public static String[] getImplementors(String serviceName, ClassLoader loader) { if (loader == null) loader = AccessController.doPrivileged( J2DoPrivHelper.getContextClassLoaderAction()); try { Set resourceList = new TreeSet(); Enumeration resources = AccessController.doPrivileged( J2DoPrivHelper.getResourcesAction(loader, PREFIX + serviceName)); while (resources.hasMoreElements()) addResources((URL) resources.nextElement(), resourceList); return (String[]) resourceList.toArray(new String[resourceList .size()]); } catch (PrivilegedActionException pae) { // silently swallow all exceptions. } catch (IOException ioe) { // silently swallow all exceptions. } return new String[0]; }
/** * Return an array of Class objects of all known service implementors of the * specified class name(as resolved by the current thread's context class * loader). */ public static Class[] getImplementorClasses(String serviceName) { return getImplementorClasses(serviceName, null); }
/** * Return an array of Strings of class names of all known service * implementors of the specified class name(as resolved by the current * thread's context class loader). */ public static String[] getImplementors(String serviceName) { return getImplementors(serviceName, null); }
/** * Return an array of Strings of class names of all known service * implementors of the specified class name, as resolved by the specified * {@link ClassLoader}. */ public static String[] getImplementors(String serviceName, ClassLoader loader) { if (loader == null) loader = AccessController.doPrivileged( J2DoPrivHelper.getContextClassLoaderAction()); try { Set resourceList = new TreeSet(); Enumeration resources = AccessController.doPrivileged( J2DoPrivHelper.getResourcesAction(loader, PREFIX + serviceName)); while (resources.hasMoreElements()) addResources((URL) resources.nextElement(), resourceList); return (String[]) resourceList.toArray(new String[resourceList .size()]); } catch (PrivilegedActionException pae) { // silently swallow all exceptions. } catch (IOException ioe) { // silently swallow all exceptions. } return new String[0]; }
public static Class[] getImplementorClasses(String serviceName, ClassLoader loader) { try { return getImplementorClasses(serviceName, loader, true); } catch (Exception cnfe) { // this will never happen with skipmissing return new Class[0]; } }
/** * Return an array of Strings of class names of all known service * implementors of the specified class name(as resolved by the current * thread's context class loader). */ public static String[] getImplementors(String serviceName) { return getImplementors(serviceName, null); }
/** * Return an array of Strings of class names of all known service * implementors of the specified class name, as resolved by the specified * {@link ClassLoader}. */ public static String[] getImplementors(String serviceName, ClassLoader loader) { if (loader == null) loader = AccessController.doPrivileged( J2DoPrivHelper.getContextClassLoaderAction()); try { Set resourceList = new TreeSet(); Enumeration resources = AccessController.doPrivileged( J2DoPrivHelper.getResourcesAction(loader, PREFIX + serviceName)); while (resources.hasMoreElements()) addResources((URL) resources.nextElement(), resourceList); return (String[]) resourceList.toArray(new String[resourceList .size()]); } catch (PrivilegedActionException pae) { // silently swallow all exceptions. } catch (IOException ioe) { // silently swallow all exceptions. } return new String[0]; }
/** * Return an array of Class objects of all known service implementors of the * specified class name(as resolved by the current thread's context class * loader). */ public static Class[] getImplementorClasses(String serviceName) { return getImplementorClasses(serviceName, null); }
/** * Return an array of Strings of class names of all known service * implementors of the specified class name(as resolved by the current * thread's context class loader). */ public static String[] getImplementors(String serviceName) { return getImplementors(serviceName, null); }
public static Class[] getImplementorClasses(String serviceName, ClassLoader loader) { try { return getImplementorClasses(serviceName, loader, true); } catch (Exception cnfe) { // this will never happen with skipmissing return new Class[0]; } }
/** * Return an array of Strings of class names of all known service * implementors of the specified interface or class. */ public static String[] getImplementors(Class serviceClass) { return getImplementors(serviceClass, null); }
/** * Return an array of Class objects of all known service implementors of the * specified class name(as resolved by the current thread's context class * loader). */ public static Class[] getImplementorClasses(String serviceName) { return getImplementorClasses(serviceName, null); }
/** * Return an array of Strings of class names of all known service * implementors of the specified interface or class. */ public static String[] getImplementors(Class serviceClass) { return getImplementors(serviceClass, null); }
public static Class[] getImplementorClasses(String serviceName, ClassLoader loader) { try { return getImplementorClasses(serviceName, loader, true); } catch (Exception cnfe) { // this will never happen with skipmissing return new Class[0]; } }
/** * Return an array of Strings of class names of all known service * implementors of the specified interface or class. */ public static String[] getImplementors(Class serviceClass) { return getImplementors(serviceClass, null); }
public static Class[] getImplementorClasses(String serviceName, ClassLoader loader) { try { return getImplementorClasses(serviceName, loader, true); } catch (Exception cnfe) { // this will never happen with skipmissing return new Class[0]; } }
/** * Return an array of Strings of class names of all known service * implementors of the specified class name(as resolved by the current * thread's context class loader). */ public static String[] getImplementors(String serviceName) { return getImplementors(serviceName, null); }