public class InstanceFactory extends Object
Constructor and Description |
---|
InstanceFactory(ApplicationAssociate applicationAssociate) |
Modifier and Type | Method and Description |
---|---|
void |
addBehavior(String behaviorId,
String behaviorClass) |
void |
addComponent(String componentType,
String componentClass) |
void |
addConverter(Class<?> targetClass,
String converterClass) |
void |
addConverter(String converterId,
String converterClass) |
void |
addDefaultValidatorId(String validatorId) |
void |
addValidator(String validatorId,
String validatorClass) |
javax.faces.component.behavior.Behavior |
createBehavior(String behaviorId) |
javax.faces.component.UIComponent |
createComponent(javax.faces.context.FacesContext context,
javax.faces.application.Resource componentResource,
javax.el.ExpressionFactory expressionFactory) |
javax.faces.component.UIComponent |
createComponent(javax.faces.context.FacesContext context,
String componentType,
String rendererType) |
javax.faces.component.UIComponent |
createComponent(String componentType) |
javax.faces.component.UIComponent |
createComponent(javax.faces.el.ValueBinding componentBinding,
javax.faces.context.FacesContext context,
String componentType) |
javax.faces.component.UIComponent |
createComponent(javax.el.ValueExpression componentExpression,
javax.faces.context.FacesContext context,
String componentType) |
javax.faces.component.UIComponent |
createComponent(javax.el.ValueExpression componentExpression,
javax.faces.context.FacesContext context,
String componentType,
String rendererType) |
javax.faces.convert.Converter |
createConverter(Class<?> targetClass) |
javax.faces.convert.Converter<?> |
createConverter(String converterId) |
javax.faces.validator.Validator<?> |
createValidator(String validatorId) |
Iterator<String> |
getBehaviorIds() |
Iterator<String> |
getComponentTypes() |
Iterator<String> |
getConverterIds() |
Iterator<Class<?>> |
getConverterTypes() |
Map<String,String> |
getDefaultValidatorInfo() |
Iterator<String> |
getValidatorIds() |
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.
|
public InstanceFactory(ApplicationAssociate applicationAssociate)
public void addComponent(String componentType, String componentClass)
Application.addComponent(java.lang.String, java.lang.String)
public javax.faces.component.UIComponent createComponent(javax.el.ValueExpression componentExpression, javax.faces.context.FacesContext context, String componentType) throws javax.faces.FacesException
javax.faces.FacesException
public javax.faces.component.UIComponent createComponent(String componentType) throws javax.faces.FacesException
javax.faces.FacesException
public javax.faces.component.UIComponent createComponent(javax.faces.context.FacesContext context, javax.faces.application.Resource componentResource, javax.el.ExpressionFactory expressionFactory) throws javax.faces.FacesException
javax.faces.FacesException
public javax.faces.component.UIComponent createComponent(javax.faces.context.FacesContext context, String componentType, String rendererType)
public javax.faces.component.UIComponent createComponent(javax.el.ValueExpression componentExpression, javax.faces.context.FacesContext context, String componentType, String rendererType)
public javax.faces.component.UIComponent createComponent(javax.faces.el.ValueBinding componentBinding, javax.faces.context.FacesContext context, String componentType) throws javax.faces.FacesException
javax.faces.FacesException
public Iterator<String> getComponentTypes()
Application.getComponentTypes()
public void addBehavior(String behaviorId, String behaviorClass)
Application.addBehavior(String, String)
public javax.faces.component.behavior.Behavior createBehavior(String behaviorId) throws javax.faces.FacesException
javax.faces.FacesException
Application.createBehavior(String)
public void addConverter(Class<?> targetClass, String converterClass)
Application.addConverter(Class, String)
public javax.faces.convert.Converter<?> createConverter(String converterId)
Application.createConverter(String)
public javax.faces.convert.Converter createConverter(Class<?> targetClass)
Application.createConverter(Class)
public Iterator<Class<?>> getConverterTypes()
Application.getConverterTypes()
public void addValidator(String validatorId, String validatorClass)
Application.addValidator(String, String)
public javax.faces.validator.Validator<?> createValidator(String validatorId) throws javax.faces.FacesException
javax.faces.FacesException
Application.createValidator(String)
public void addDefaultValidatorId(String validatorId)
Application.addDefaultValidatorId(String)
public Map<String,String> getDefaultValidatorInfo()
Application.getDefaultValidatorInfo()
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.
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 ctorCopyright © 2010–2021 JBoss by Red Hat. All rights reserved.