Class FactoryFinder

java.lang.Object
javax.ws.rs.ext.FactoryFinder

class FactoryFinder extends Object
  • Constructor Details

    • FactoryFinder

      FactoryFinder()
  • Method Details

    • getContextClassLoader

      static ClassLoader getContextClassLoader()
    • newInstance

      private static Object newInstance(String className, ClassLoader classLoader) throws ClassNotFoundException
      Creates an instance of the specified class using the specified ClassLoader object.
      Throws:
      ClassNotFoundException - if the given class could not be found or could not be instantiated
    • find

      static Object find(String factoryId, String fallbackClassName) throws ClassNotFoundException
      Finds the implementation Class object for the given factory name, or if that fails, finds the Class object for the given fallback class name. The arguments supplied MUST be used in order. If using the first argument is successful, the second one will not be used.

      This method is package private so that this code can be shared.

      Parameters:
      factoryId - the name of the factory to find, which is a system property
      fallbackClassName - the implementation class name, which is to be used only if nothing else is found; null to indicate that there is no fallback class name
      Returns:
      the Class object of the specified message factory; may not be null