Class InstanceFactory

java.lang.Object
com.sun.faces.application.applicationimpl.InstanceFactory

public class InstanceFactory extends Object
  • Constructor Details

  • Method Details

    • addComponent

      public void addComponent(String componentType, String componentClass)
    • createComponent

      public UIComponent createComponent(jakarta.el.ValueExpression componentExpression, FacesContext context, String componentType) throws FacesException
      Throws:
      FacesException
    • createComponent

      public UIComponent createComponent(String componentType) throws FacesException
      Throws:
      FacesException
    • createComponent

      public UIComponent createComponent(FacesContext context, Resource componentResource, jakarta.el.ExpressionFactory expressionFactory) throws FacesException
      Throws:
      FacesException
    • createComponent

      public UIComponent createComponent(FacesContext context, String componentType, String rendererType)
    • createComponent

      public UIComponent createComponent(jakarta.el.ValueExpression componentExpression, FacesContext context, String componentType, String rendererType)
    • getComponentTypes

      public Iterator<String> getComponentTypes()
    • addBehavior

      public void addBehavior(String behaviorId, String behaviorClass)
    • createBehavior

      public Behavior createBehavior(String behaviorId) throws FacesException
      Throws:
      FacesException
    • getBehaviorIds

      public Iterator<String> getBehaviorIds()
    • addConverter

      public void addConverter(String converterId, String converterClass)
    • addConverter

      public void addConverter(Class<?> targetClass, String converterClass)
    • createConverter

      public Converter<?> createConverter(String converterId)
    • createConverter

      public Converter createConverter(Class<?> targetClass)
    • getConverterIds

      public Iterator<String> getConverterIds()
    • getConverterTypes

      public Iterator<Class<?>> getConverterTypes()
    • addValidator

      public void addValidator(String validatorId, String validatorClass)
    • createValidator

      public Validator<?> createValidator(String validatorId) throws FacesException
      Throws:
      FacesException
    • getValidatorIds

      public Iterator<String> getValidatorIds()
    • addDefaultValidatorId

      public void addDefaultValidatorId(String validatorId)
    • getDefaultValidatorInfo

      public Map<String,String> getDefaultValidatorInfo()
    • newConverter

      protected Object newConverter(Class<?> key, Map<Class<?>,Object> map, Class<?> targetClass)

      The same as newThing except that a single argument constructor that accepts a Class is looked for before calling the no-arg version.

      PRECONDITIONS: the values in the Map are either Strings representing fully qualified java class names, or java.lang.Class instances.

      ALGORITHM: Look in the argument map for a value for the argument key. If found, if the value is instanceof String, assume the String specifies a fully qualified java class name and obtain the java.lang.Class instance for that String using Util.loadClass(). Replace the String instance in the argument map with the Class instance. If the value is instanceof Class, proceed. Assert that the value is either instanceof java.lang.Class or java.lang.String.

      Now that you have a java.lang.class, call its newInstance and return it as the result of this method.

      Parameters:
      key - Used to look up the value in the Map.
      map - The Map that will be searched.
      targetClass - the target class for the single argument ctor
      Returns:
      The new object instance.