index attribute is specified
this element uses additional int parameter.
If the name attribute is not specified
this element uses method "get" as getter
and method "set" as setter.
This element defines getter if it contains no argument.
It returns the value of the property in this case.
For example:<property name="object" index="10"/>is shortcut to
<method name="getObject">
<int>10</int>
</method>
which is equivalent to getObject(10) in Java code.
This element defines setter if it contains one argument.
It does not return the value of the property in this case.
For example:<property><int>0</int></property>is shortcut to
<method name="set">
<int>0</int>
</method>
which is equivalent to set(0) in Java code.
The following attributes are supported:
| Modifier and Type | Field and Description |
|---|---|
| pack-priv static final String | |
| private Integer | |
| pack-priv static final String |
| Access | Constructor and Description |
|---|---|
| pack-priv |
| Modifier and Type | Method and Description |
|---|---|
| public void | addAttribute(String
the attribute name name, String the attribute value value)Overrides com. Parses attributes of the element. |
| private static Method | Returns: method object that represents found getterthe class that contains method type, String the name of the property name, Class<?>... the method arguments args)Performs the search of the getter for the property
with specified |
| private static Method | Returns: method object that represents found setterthe class that contains method type, String the name of the property name, Class<?>... the method arguments args)Performs the search of the setter for the property
with specified |
| private static PropertyDescriptor | Returns: descriptor for the named propertythe class to introspect type, String the property name name)Performs the search of the descriptor for the property
with specified |
| private static Object | Returns: the value of the propertythe context bean that contains property bean, String the name of the property name, Integer the index of the indexed property index)Performs the search of the getter for the property
with specified |
| protected Object | Returns: the value of the specified propertythe name of the property name)Implements abstract com. Returns the value of the property with specified |
| protected boolean | Returns: true if the value of this element should be used
as an argument of the element that contained in this one,
false otherwiseOverrides com. Tests whether the value of this element can be used as an argument of the element that contained in this one. |
| private static void | setPropertyValue(Object
the context bean that contains property bean, String the name of the property name, Integer the index of the indexed property index, Object the new value for the property value)Performs the search of the setter for the property
with specified |
| protected void | setValue(String
the name of the property name, Object the new value for the specified property value)Implements abstract com. Sets the new value for the property with specified |
| GETTER | back to summary |
|---|---|
| pack-priv static final String GETTER | |
| index | back to summary |
|---|---|
| private Integer index | |
| SETTER | back to summary |
|---|---|
| pack-priv static final String SETTER | |
| PropertyElementHandler | back to summary |
|---|---|
| pack-priv PropertyElementHandler() | |
| addAttribute | back to summary |
|---|---|
| public void addAttribute(String name, String value) Overrides com. Parses attributes of the element. The following attributes are supported:
| |
| findGetter | back to summary |
|---|---|
| private static Method findGetter(Class<?> type, String name, Class<?>... args) throws IntrospectionException, NoSuchMethodException Performs the search of the getter for the property
with specified
| |
| findSetter | back to summary |
|---|---|
| private static Method findSetter(Class<?> type, String name, Class<?>... args) throws IntrospectionException, NoSuchMethodException Performs the search of the setter for the property
with specified
| |
| getProperty | back to summary |
|---|---|
| private static PropertyDescriptor getProperty(Class<?> type, String name) throws IntrospectionException Performs the search of the descriptor for the property
with specified
| |
| getPropertyValue | back to summary |
|---|---|
| private static Object getPropertyValue(Object bean, String name, Integer index) throws IllegalAccessException, IntrospectionException, InvocationTargetException, NoSuchMethodException Performs the search of the getter for the property
with specified
| |
| getValue | back to summary |
|---|---|
| protected Object getValue(String name) Implements abstract com. Returns the value of the property with specified | |
| isArgument | back to summary |
|---|---|
| protected boolean isArgument() Overrides com. Tests whether the value of this element can be used as an argument of the element that contained in this one.
| |
| setPropertyValue | back to summary |
|---|---|
| private static void setPropertyValue(Object bean, String name, Integer index, Object value) throws IllegalAccessException, IntrospectionException, InvocationTargetException, NoSuchMethodException Performs the search of the setter for the property
with specified
| |
| setValue | back to summary |
|---|---|
| protected void setValue(String name, Object value) Implements abstract com. Sets the new value for the property with specified | |