Class FactoryFinder

java.lang.Object
javax.xml.soap.FactoryFinder

class FactoryFinder extends Object
  • Field Details

  • Constructor Details

    • FactoryFinder

      FactoryFinder()
  • Method Details

    • find

      static <T> T find(Class<T> factoryClass, String defaultClassName, boolean tryFallback, String deprecatedFactoryId) throws SOAPException
      Finds the implementation Class object for the given factory type. If it fails and tryFallback is true finds the Class object for the given default class name. The arguments supplied must be used in order Note the default class name may be needed even if fallback is not to be attempted in order to check if requested type is fallback.

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

      Parameters:
      factoryClass - factory abstract class or interface to be found
      deprecatedFactoryId - deprecated name of a factory; it is used for types where class name is different from a name being searched (in previous spec).
      defaultClassName - the implementation class name, which is to be used only if nothing else is found; null to indicate that there is no default class name
      tryFallback - whether to try the default class as a fallback
      Returns:
      the Class object of the specified message factory; may not be null
      Throws:
      SOAPException - if there is a SOAP error
    • find

      static <T> T find(Class<T> factoryClass, String defaultClassName, boolean tryFallback) throws SOAPException
      Throws:
      SOAPException
    • newInstance

      private static Object newInstance(String className, String defaultClassName, ClassLoader tccl) throws SOAPException
      Throws:
      SOAPException
    • fromMetaInfServices

      private static String fromMetaInfServices(String deprecatedFactoryId, ClassLoader tccl)
    • fromJDKProperties

      private static String fromJDKProperties(String factoryId, String deprecatedFactoryId)
    • fromSystemProperty

      private static String fromSystemProperty(String factoryId, String deprecatedFactoryId)
    • getSystemProperty

      private static String getSystemProperty(String property)
    • logFound

      private static void logFound(String value)
    • isOsgi

      private static boolean isOsgi()
    • lookupUsingOSGiServiceLoader

      private static Object lookupUsingOSGiServiceLoader(String factoryId)