@Documented @Target(METHOD) @Retention(RUNTIME) public @interface BeanProperty
An annotation used to specify some property-related information for the
automatically generated
BeanInfo classes. This annotation is not used
if the annotated class has a corresponding user-defined BeanInfo
class, which does not imply the automatic analysis. If both the read and the
write methods of the property are annotated, then the read method annotation
will have more priority and replace the write method annotation.- Since:
- 9
- See Also:
BeanInfo.getPropertyDescriptors()
-
Optional Element Summary
Optional Elements Modifier and Type Optional Element Description booleanboundThe value that indicates whether the annotated property can be aboundproperty or not.StringdescriptionTheshort descriptionfor thedescriptorof the annotated property.String[]enumerationValuesThe array of names for the public static fields that contains the valid values of the annotated property.booleanexpertThe value that indicates whether the annotated property is anexpertproperty or not.booleanhiddenThe value that indicates whether the annotated property is ahiddenproperty or not.booleanpreferredThe value that indicates whether the annotated property is apreferredproperty or not.booleanrequiredThe value that indicates whether the annotated property is a required property or not.booleanvisualUpdateThe value that indicates whether the corresponding component is repainted after the annotated property got changed or not.
-
Element Details
-
bound
boolean boundThe value that indicates whether the annotated property can be aboundproperty or not. This value applies only to the beans that have thepropertyChangeevent set.- Returns:
trueif the annotated property can be a bound property;falseotherwise.
- Default:
- true
-
expert
boolean expertThe value that indicates whether the annotated property is anexpertproperty or not.- Returns:
trueif the annotated property is an expert property;falseotherwise.
- Default:
- false
-
boolean hiddenThe value that indicates whether the annotated property is a
hiddenproperty or not.- Returns:
trueif the annotated property is a hidden property;falseotherwise.
- Default:
- false
-
preferred
boolean preferredThe value that indicates whether the annotated property is apreferredproperty or not.- Returns:
trueif the annotated property is a preferred property;falseotherwise.
- Default:
- false
-
required
boolean requiredThe value that indicates whether the annotated property is a required property or not.- Returns:
trueif the annotated property is a required property;falseotherwise.
- Default:
- false
-
visualUpdate
boolean visualUpdateThe value that indicates whether the corresponding component is repainted after the annotated property got changed or not.- Returns:
trueif the corresponding component is repainted;falseotherwise.
- Default:
- false
-
description
String descriptionTheshort descriptionfor thedescriptorof the annotated property.- Returns:
- the property description, or an empty string if the description is not set.
- Default:
- ""
-
enumerationValues
String[] enumerationValuesThe array of names for the public static fields that contains the valid values of the annotated property. These names are used to generate theenumerationValuesfeature attributethat must contain the following items per each property value: a displayable name for the property value, the actual property value, and a Java code piece used for the code generator.- Returns:
- the names of the valid values of the annotated property, or an empty array if the names are not provided.
- Default:
- {}
-