Package jakarta.el

Class FactoryFinder

java.lang.Object
jakarta.el.FactoryFinder

class FactoryFinder extends Object
  • Constructor Details

    • FactoryFinder

      FactoryFinder()
  • Method Details

    • newInstance

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

      static Object find(Class<?> serviceClass, String factoryId, String fallbackClassName, Properties properties)
      Finds the implementation Class object for the given factory. The following search order is used:
      1. ServiceLoader lookup using serviceClass
      2. Property file located as $java.home/lib/el.properties
      3. System property lookup using factoryId
      4. Create an instance of fallbackClassName
      This method is package private so that this code can be shared.
      Parameters:
      serviceClass - The class to use when searching for the factory using the ServiceLoader mechanism
      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
      Throws:
      ELException - if there is an error