Package com.im.commons.ui.beans
Class PropertyDescriptorBuilder
- java.lang.Object
-
- com.im.commons.ui.beans.PropertyDescriptorBuilder
-
public final class PropertyDescriptorBuilder extends java.lang.ObjectBuilds upPropertyDescriptorinstance using various options.
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static PropertyDescriptorBuildercreateBooleanPropertyBuilder(java.lang.String propertyName, java.lang.Class<?> beanClass)Creates newPropertyDescriptorBuilderfor boolean read-write properties.static PropertyDescriptorBuildercreateBooleanReadOnlyPropertyBuilder(java.lang.String propertyName, java.lang.Class<?> beanClass)Creates newPropertyDescriptorBuilderfor boolean read-only properties.static PropertyDescriptorBuildercreatePropertyBuilder(java.lang.String propertyName, java.lang.Class<?> beanClass)Creates newPropertyDescriptorBuilderfor non-boolean read-write properties.static PropertyDescriptorBuildercreateReadOnlyPropertyBuilder(java.lang.String propertyName, java.lang.Class<?> beanClass)Creates newPropertyDescriptorBuilderfor non-boolean read-only properties.java.beans.PropertyDescriptorgetResult()Gets constructedPropertyDescriptor.voidsetHidden(boolean hidden)The "hidden" flag is used to identify features that are intended only for tool use, and which should not be exposed to humans.voidsetLocalized(boolean localized)
-
-
-
Method Detail
-
createPropertyBuilder
public static PropertyDescriptorBuilder createPropertyBuilder(java.lang.String propertyName, java.lang.Class<?> beanClass) throws java.beans.IntrospectionException
Creates newPropertyDescriptorBuilderfor non-boolean read-write properties.- Parameters:
propertyName- The programmatic name of the property.beanClass- The Class object for the target bean.- Returns:
- new
PropertyDescriptorBuilderinstance. - Throws:
java.beans.IntrospectionException- if an exception occurs during introspection
-
createReadOnlyPropertyBuilder
public static PropertyDescriptorBuilder createReadOnlyPropertyBuilder(java.lang.String propertyName, java.lang.Class<?> beanClass) throws java.beans.IntrospectionException
Creates newPropertyDescriptorBuilderfor non-boolean read-only properties. Resulting property will not be editable. No setter method is needed.- Parameters:
propertyName- The programmatic name of the property.beanClass- The Class object for the target bean.- Returns:
- new
PropertyDescriptorBuilderinstance. - Throws:
java.beans.IntrospectionException- if an exception occurs during introspection
-
createBooleanPropertyBuilder
public static PropertyDescriptorBuilder createBooleanPropertyBuilder(java.lang.String propertyName, java.lang.Class<?> beanClass) throws java.beans.IntrospectionException
Creates newPropertyDescriptorBuilderfor boolean read-write properties. Resulting property isboolean. In this case getter method must have prefixis.- Parameters:
propertyName- The programmatic name of the property.beanClass- The Class object for the target bean.- Returns:
- new
PropertyDescriptorBuilderinstance. - Throws:
java.beans.IntrospectionException- if an exception occurs during introspection
-
createBooleanReadOnlyPropertyBuilder
public static PropertyDescriptorBuilder createBooleanReadOnlyPropertyBuilder(java.lang.String propertyName, java.lang.Class<?> beanClass) throws java.beans.IntrospectionException
Creates newPropertyDescriptorBuilderfor boolean read-only properties. Resulting property isboolean. In this case getter method must have prefixis. Resulting property is not editable. No setter method is needed..- Parameters:
propertyName- The programmatic name of the property.beanClass- The Class object for the target bean.- Returns:
- new
PropertyDescriptorBuilderinstance. - Throws:
java.beans.IntrospectionException- if an exception occurs during introspection
-
setLocalized
public void setLocalized(boolean localized)
-
setHidden
public void setHidden(boolean hidden)
The "hidden" flag is used to identify features that are intended only for tool use, and which should not be exposed to humans.- Parameters:
hidden- True if this feature should be hidden from human users.
-
getResult
public java.beans.PropertyDescriptor getResult()
Gets constructedPropertyDescriptor.- Returns:
PropertyDescriptorinstance
-
-