public abstract class BaseCachedBuilder extends Object
Modifier and Type | Class and Description |
---|---|
protected class |
BaseCachedBuilder.Property
Property prepared for setting.
|
Modifier and Type | Field and Description |
---|---|
protected Map<Object,Object> |
m_attributes
List of attributes
|
protected Map<String,ValueExpression> |
m_bindings
Map of
String name, ValueExpression value pairs. |
protected List<BaseCachedBuilder.Property> |
m_properties
List of
BaseCachedBuilder.Property s. |
protected Map<String,Object> |
m_propertyDescriptors
Map of
String name, {link @PropertyDescriptor}
or {link @List} of PropertyDescriptor pairs
for the built class. |
protected static Class<?>[] |
NO_ARGS |
protected static Pattern |
SIGNATURE_PATTERN |
Constructor and Description |
---|
BaseCachedBuilder() |
Modifier and Type | Method and Description |
---|---|
void |
addAttribute(Object name,
Object value) |
protected void |
addProperty(FacesContext ctx,
PropertyDescriptor descriptor,
Object value,
String signature)
Add the specified property to the object to be built.
|
void |
addProperty(FacesContext ctx,
String name,
Object value)
Add the specified property to the object to be built.
|
void |
addProperty(FacesContext ctx,
String name,
Object value,
String signature)
Add the specified property to the object to be built.
|
protected Object |
convertToType(Class<?> originalType,
Object originalValue,
Class<?> convertedType)
Convert the originalValue to the convertedType.
|
static IBindingExpressionReWriter |
getBindingExpressionReWriter()
Returns the IBindingExpressionReWriter for the current thread
|
protected abstract Class<?> |
getClassToBuild(FacesContext ctx) |
protected Class<?>[] |
getMethodBindingArgTypes(String propertyName)
Some method bindings require parameters, this method returns the param types
for specific well-known properties
|
protected Object |
getPropertyDescriptor(FacesContext ctx,
String property) |
protected boolean |
isExpression(Object o) |
static void |
setBindingExpressionReWriter(IBindingExpressionReWriter bindingExpressionRewriter)
Sets the IBindingExpressionReWriter for the current thread
|
protected void |
setProperties(FacesContext ctx,
Object o)
Set the pre-configured properties of the built object.
|
protected void |
setProperty(FacesContext ctx,
Object o,
PropertyDescriptor descriptor,
Object value)
Sets the specified property on the specified object.
|
protected static final Class<?>[] NO_ARGS
protected static final Pattern SIGNATURE_PATTERN
protected List<BaseCachedBuilder.Property> m_properties
BaseCachedBuilder.Property
s.protected Map<String,ValueExpression> m_bindings
String
name, ValueExpression
value pairs.protected Map<String,Object> m_propertyDescriptors
String
name, {link @PropertyDescriptor}
or {link @List} of PropertyDescriptor
pairs
for the built class.public static void setBindingExpressionReWriter(IBindingExpressionReWriter bindingExpressionRewriter)
bindingExpressionRewriter
- the binding expression rewriter for the current threadpublic static IBindingExpressionReWriter getBindingExpressionReWriter()
public void addProperty(FacesContext ctx, String name, Object value)
public void addProperty(FacesContext ctx, String name, Object value, String signature)
protected abstract Class<?> getClassToBuild(FacesContext ctx)
protected boolean isExpression(Object o)
protected void setProperties(FacesContext ctx, Object o) throws Exception
Exception
protected void setProperty(FacesContext ctx, Object o, PropertyDescriptor descriptor, Object value) throws Exception
Exception
protected Class<?>[] getMethodBindingArgTypes(String propertyName)
propertyName
- protected void addProperty(FacesContext ctx, PropertyDescriptor descriptor, Object value, String signature) throws Exception
Exception
protected Object getPropertyDescriptor(FacesContext ctx, String property) throws FacesException
PropertyDescriptor
or List
of PropertyDescriptor
s
for the specified property of the class this builder builds.FacesException