java.lang.Object | ||
↳ | org.apache.commons.beanutils.BeanUtilsBean | |
↳ | org.apache.commons.beanutils.locale.LocaleBeanUtilsBean |
Utility methods for populating JavaBeans properties via reflection in a locale-dependent manner.
Nested Classes | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
LocaleBeanUtilsBean.Descriptor |
This class is deprecated.
Property name expressions are now processed by
the configured Resolver implementation and this class
is no longer used by BeanUtils.
|
Public Constructors | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Construct instance with standard conversion bean
| |||||||||||
Construct instance that uses given locale conversion
| |||||||||||
Construct instance that uses given locale conversion
|
Public Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Is the pattern to be applied localized
(Indicate whether the pattern is localized or not)
| |||||||||||
Gets the default Locale
| |||||||||||
Return the value of the specified locale-sensitive indexed property
of the specified bean, as a String using the default conversion pattern of
the corresponding
LocaleConverter . | |||||||||||
Return the value of the specified locale-sensetive indexed property
of the specified bean, as a String using the default conversion pattern of
the corresponding
LocaleConverter . | |||||||||||
Return the value of the specified locale-sensetive indexed property
of the specified bean, as a String using the specified conversion pattern.
| |||||||||||
Return the value of the specified locale-sensitive indexed property
of the specified bean, as a String.
| |||||||||||
Gets singleton instance
| |||||||||||
Gets the bean instance used for conversions
| |||||||||||
Return the value of the specified mapped locale-sensitive property
of the specified bean, as a String using the specified conversion pattern.
| |||||||||||
Return the value of the specified mapped locale-sensitive property
of the specified bean, as a String
The key is specified as a method parameter and must *not* be included
in the property name expression
| |||||||||||
Return the value of the specified locale-sensitive mapped property
of the specified bean, as a String using the default
conversion pattern of the corresponding
LocaleConverter . | |||||||||||
Return the value of the specified locale-sensitive mapped property
of the specified bean, as a String using the specified pattern.
| |||||||||||
Return the value of the (possibly nested) locale-sensitive property
of the specified name, for the specified bean,
as a String using the specified pattern.
| |||||||||||
Return the value of the (possibly nested) locale-sensitive property
of the specified name, for the specified bean, as a String using the default
conversion pattern of the corresponding
LocaleConverter . | |||||||||||
Return the value of the specified locale-sensitive property
of the specified bean, no matter which property reference
format is used, as a String using the specified conversion pattern.
| |||||||||||
Return the value of the specified locale-sensitive property
of the specified bean, no matter which property reference
format is used, as a String using the default
conversion pattern of the corresponding
LocaleConverter . | |||||||||||
Return the value of the specified simple locale-sensitive property
of the specified bean, converted to a String using the specified
conversion pattern.
| |||||||||||
Return the value of the specified simple locale-sensitive property
of the specified bean, converted to a String using the default
conversion pattern of the corresponding
LocaleConverter . | |||||||||||
Sets whether the pattern is applied localized
(Indicate whether the pattern is localized or not)
| |||||||||||
Sets the default Locale.
| |||||||||||
Sets the instance which provides the functionality for
LocaleBeanUtils . | |||||||||||
Set the specified locale-sensitive property value, performing type
conversions as required to conform to the type of the destination
property using the specified conversion pattern.
| |||||||||||
Set the specified locale-sensitive property value, performing type
conversions as required to conform to the type of the destination property
using the default conversion pattern of the corresponding
LocaleConverter . |
Protected Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
This method is deprecated.
Property name expressions are now processed by
the configured
Resolver implementation and this method
is no longer used by BeanUtils.
| |||||||||||
Convert the specified value to the required type using the
specified conversion pattern.
| |||||||||||
Convert the specified value to the required type.
| |||||||||||
Calculate the property type.
| |||||||||||
Invoke the setter method.
|
[Expand]
Inherited Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
From class
org.apache.commons.beanutils.BeanUtilsBean
| |||||||||||
From class
java.lang.Object
|
Construct instance with standard conversion bean
Construct instance that uses given locale conversion
localeConvertUtils | use this localeConvertUtils to perform
conversions |
---|---|
convertUtilsBean | use this for standard conversions |
propertyUtilsBean | use this for property conversions |
Construct instance that uses given locale conversion
localeConvertUtils | use this localeConvertUtils to perform
conversions
|
---|
Is the pattern to be applied localized (Indicate whether the pattern is localized or not)
true
if pattern is localized,
otherwise false
Return the value of the specified locale-sensitive indexed property
of the specified bean, as a String using the default conversion pattern of
the corresponding LocaleConverter
. The zero-relative index
of the required value must be included (in square brackets) as a suffix
to the property name, or IllegalArgumentException
will be thrown.
bean | Bean whose property is to be extracted |
---|---|
name | propertyname[index] of the property value
to be extracted |
IllegalAccessException | if the caller does not have access to the property accessor method |
---|---|
InvocationTargetException | if the property accessor method throws an exception |
NoSuchMethodException | if an accessor method for this propety cannot be found |
Return the value of the specified locale-sensetive indexed property
of the specified bean, as a String using the default conversion pattern of
the corresponding LocaleConverter
.
The index is specified as a method parameter and
must *not* be included in the property name expression
bean | Bean whose property is to be extracted |
---|---|
name | Simple property name of the property value to be extracted |
index | Index of the property value to be extracted |
IllegalAccessException | if the caller does not have access to the property accessor method |
---|---|
InvocationTargetException | if the property accessor method throws an exception |
NoSuchMethodException | if an accessor method for this propety cannot be found |
Return the value of the specified locale-sensetive indexed property of the specified bean, as a String using the specified conversion pattern. The index is specified as a method parameter and must *not* be included in the property name expression
bean | Bean whose property is to be extracted |
---|---|
name | Simple property name of the property value to be extracted |
index | Index of the property value to be extracted |
pattern | The conversion pattern |
IllegalAccessException | if the caller does not have access to the property accessor method |
---|---|
InvocationTargetException | if the property accessor method throws an exception |
NoSuchMethodException | if an accessor method for this propety cannot be found |
Return the value of the specified locale-sensitive indexed property
of the specified bean, as a String. The zero-relative index of the
required value must be included (in square brackets) as a suffix to
the property name, or IllegalArgumentException
will be
thrown.
bean | Bean whose property is to be extracted |
---|---|
name | propertyname[index] of the property value
to be extracted |
pattern | The conversion pattern |
IllegalAccessException | if the caller does not have access to the property accessor method |
---|---|
InvocationTargetException | if the property accessor method throws an exception |
NoSuchMethodException | if an accessor method for this propety cannot be found |
Gets singleton instance
Gets the bean instance used for conversions
Return the value of the specified mapped locale-sensitive property of the specified bean, as a String using the specified conversion pattern. The key is specified as a method parameter and must *not* be included in the property name expression.
bean | Bean whose property is to be extracted |
---|---|
name | Simple property name of the property value to be extracted |
key | Lookup key of the property value to be extracted |
pattern | The conversion pattern |
IllegalAccessException | if the caller does not have access to the property accessor method |
---|---|
InvocationTargetException | if the property accessor method throws an exception |
NoSuchMethodException | if an accessor method for this propety cannot be found |
Return the value of the specified mapped locale-sensitive property of the specified bean, as a String The key is specified as a method parameter and must *not* be included in the property name expression
bean | Bean whose property is to be extracted |
---|---|
name | Simple property name of the property value to be extracted |
key | Lookup key of the property value to be extracted |
IllegalAccessException | if the caller does not have access to the property accessor method |
---|---|
InvocationTargetException | if the property accessor method throws an exception |
NoSuchMethodException | if an accessor method for this propety cannot be found |
Return the value of the specified locale-sensitive mapped property
of the specified bean, as a String using the default
conversion pattern of the corresponding LocaleConverter
.
The String-valued key of the required value
must be included (in parentheses) as a suffix to
the property name, or IllegalArgumentException
will be
thrown.
bean | Bean whose property is to be extracted |
---|---|
name | propertyname(index) of the property value
to be extracted |
IllegalAccessException | if the caller does not have access to the property accessor method |
---|---|
InvocationTargetException | if the property accessor method throws an exception |
NoSuchMethodException | if an accessor method for this propety cannot be found |
Return the value of the specified locale-sensitive mapped property
of the specified bean, as a String using the specified pattern.
The String-valued key of the required value
must be included (in parentheses) as a suffix to
the property name, or IllegalArgumentException
will be
thrown.
bean | Bean whose property is to be extracted |
---|---|
name | propertyname(index) of the property value
to be extracted |
pattern | The conversion pattern |
IllegalAccessException | if the caller does not have access to the property accessor method |
---|---|
InvocationTargetException | if the property accessor method throws an exception |
NoSuchMethodException | if an accessor method for this propety cannot be found |
Return the value of the (possibly nested) locale-sensitive property of the specified name, for the specified bean, as a String using the specified pattern.
bean | Bean whose property is to be extracted |
---|---|
name | Possibly nested name of the property to be extracted |
pattern | The conversion pattern |
IllegalAccessException | if the caller does not have access to the property accessor method |
---|---|
IllegalArgumentException | if a nested reference to a property returns null |
InvocationTargetException | if the property accessor method throws an exception |
NoSuchMethodException | if an accessor method for this propety cannot be found |
Return the value of the (possibly nested) locale-sensitive property
of the specified name, for the specified bean, as a String using the default
conversion pattern of the corresponding LocaleConverter
.
bean | Bean whose property is to be extracted |
---|---|
name | Possibly nested name of the property to be extracted |
IllegalAccessException | if the caller does not have access to the property accessor method |
---|---|
IllegalArgumentException | if a nested reference to a property returns null |
InvocationTargetException | if the property accessor method throws an exception |
NoSuchMethodException | if an accessor method for this propety cannot be found |
Return the value of the specified locale-sensitive property of the specified bean, no matter which property reference format is used, as a String using the specified conversion pattern.
bean | Bean whose property is to be extracted |
---|---|
name | Possibly indexed and/or nested name of the property to be extracted |
pattern | The conversion pattern |
IllegalAccessException | if the caller does not have access to the property accessor method |
---|---|
InvocationTargetException | if the property accessor method throws an exception |
NoSuchMethodException | if an accessor method for this propety cannot be found |
Return the value of the specified locale-sensitive property
of the specified bean, no matter which property reference
format is used, as a String using the default
conversion pattern of the corresponding LocaleConverter
.
bean | Bean whose property is to be extracted |
---|---|
name | Possibly indexed and/or nested name of the property to be extracted |
IllegalAccessException | if the caller does not have access to the property accessor method |
---|---|
InvocationTargetException | if the property accessor method throws an exception |
NoSuchMethodException | if an accessor method for this propety cannot be found |
Return the value of the specified simple locale-sensitive property of the specified bean, converted to a String using the specified conversion pattern.
bean | Bean whose property is to be extracted |
---|---|
name | Name of the property to be extracted |
pattern | The conversion pattern |
IllegalAccessException | if the caller does not have access to the property accessor method |
---|---|
InvocationTargetException | if the property accessor method throws an exception |
NoSuchMethodException | if an accessor method for this propety cannot be found |
Return the value of the specified simple locale-sensitive property
of the specified bean, converted to a String using the default
conversion pattern of the corresponding LocaleConverter
.
bean | Bean whose property is to be extracted |
---|---|
name | Name of the property to be extracted |
IllegalAccessException | if the caller does not have access to the property accessor method |
---|---|
InvocationTargetException | if the property accessor method throws an exception |
NoSuchMethodException | if an accessor method for this propety cannot be found |
Sets whether the pattern is applied localized (Indicate whether the pattern is localized or not)
newApplyLocalized | true if pattern is localized,
otherwise false
|
---|
Sets the default Locale.
locale | the default locale |
---|
Sets the instance which provides the functionality for LocaleBeanUtils
.
This is a pseudo-singleton - an single instance is provided per (thread) context classloader.
This mechanism provides isolation for web apps deployed in the same container.
newInstance | a new singleton instance |
---|
Set the specified locale-sensitive property value, performing type conversions as required to conform to the type of the destination property using the specified conversion pattern.
bean | Bean on which setting is to be performed |
---|---|
name | Property name (can be nested/indexed/mapped/combo) |
value | Value to be set |
pattern | The conversion pattern |
IllegalAccessException | if the caller does not have access to the property accessor method |
---|---|
InvocationTargetException | if the property accessor method throws an exception |
Set the specified locale-sensitive property value, performing type
conversions as required to conform to the type of the destination property
using the default conversion pattern of the corresponding LocaleConverter
.
bean | Bean on which setting is to be performed |
---|---|
name | Property name (can be nested/indexed/mapped/combo) |
value | Value to be set |
IllegalAccessException | if the caller does not have access to the property accessor method |
---|---|
InvocationTargetException | if the property accessor method throws an exception |
This method is deprecated.
Property name expressions are now processed by
the configured Resolver
implementation and this method
is no longer used by BeanUtils.
Resolve any nested expression to get the actual target property.
bean | The bean |
---|---|
name | The property name |
IllegalAccessException | if the caller does not have access to the property accessor method |
---|---|
InvocationTargetException | if the property accessor method throws an exception |
Convert the specified value to the required type using the specified conversion pattern.
type | The Java type of target property |
---|---|
index | The indexed subscript value (if any) |
value | The value to be converted |
pattern | The conversion pattern |
Convert the specified value to the required type.
type | The Java type of target property |
---|---|
index | The indexed subscript value (if any) |
value | The value to be converted |
Calculate the property type.
target | The bean |
---|---|
name | The property name |
propName | The Simple name of target property |
IllegalAccessException | if the caller does not have access to the property accessor method |
---|---|
InvocationTargetException | if the property accessor method throws an exception |
Invoke the setter method.
target | The bean |
---|---|
propName | The Simple name of target property |
key | The Mapped key value (if any) |
index | The indexed subscript value (if any) |
newValue | The value to be set |
IllegalAccessException | if the caller does not have access to the property accessor method |
---|---|
InvocationTargetException | if the property accessor method throws an exception |