|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: REQUIRED | OPTIONAL | DETAIL: ELEMENT |
@Inherited @Retention(value=RUNTIME) @Target(value=ANNOTATION_TYPE) public @interface PropertySet
The PropertySet annotation type is used to mark an interface that defines a set of properties that are associated with a Java Control. By convention, property sets are declared as an inner annotation types on the Java Control public interface.
Each member of the annotation type targeted by the PropertySet
annotation
will define a new property for the control.
Here is a simple example:
public interface MyControl extends org.apache.beehive.controls.api.Control
{
A Java Control can have multiple property sets associated with it.
Optional Element Summary | |
---|---|
boolean |
externalConfig
The externalConfig member defines whether properties in the set will be settable via external configuration. |
boolean |
hasSetters
The hasSetters member defines whether properties in the set will have programmatic setter methods. |
boolean |
optional
The optional member specifies that this property set may optionally be associated with the control. |
String |
prefix
The prefix member defines a prefix that will be used in all property setter/getter methods for properties in the PropertySet . |
public abstract String prefix
PropertySet
. It is necessary to specify
a prefixes when a control interface has multiple property sets that contain
properties with the same name.
The following code shows the basic conventions for setter/getter methods on a Java
Control Bean:
public void set<prefix><propertyName>(<propertyType> value);
public <propertyType> get<prefix><propertyName>();
/code>
where prefix
is the prefix member value, propertyName
is
the name of the declared property member, and propertyType
is the
type associated with the declared property member.
public abstract boolean externalConfig
public abstract boolean optional
ControlBeanContext.getControlPropertySet(java.lang.Class)
,
ControlBeanContext.getMethodPropertySet(java.lang.reflect.Method, java.lang.Class)
public abstract boolean hasSetters
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: REQUIRED | OPTIONAL | DETAIL: ELEMENT |