|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: REQUIRED | OPTIONAL | DETAIL: ELEMENT |
@Documented @Target(value={TYPE,METHOD}) @Retention(value=RUNTIME) public @interface PropertySet
Defines a set of properties.
All interfaces that provide access to properties are required to be annotated by this annotation.
Example
@PropertySet("myprops") public interface MyProperties { ... }
The name of the property set is specified as the value
element.
There are two special values:
Example: empty string
@PropertySet("") public interface MyProperties { ... }
Example: single space (default)
@PropertySet public interface MyProperties { ... }
The annotation may be placed at type or method level.
If the annotation is given at type level, a new property set is defined. All properties defined in that type belong to the given set, unless there exists an explicit property set annotation on a method that overrides it.
If the annotation is given at method level no new property set is defined. The annotated property is simply switched to belong to the given type. If a property set is only referenced at method level and never on type level, it is called virtual property set. Therefore make sure that there is at least a property set annotation at type level.
Note:
You may only encounter the difference if you try to select the set of property sets (e.g. report generators do so). All properties associated with a virtual property set will not show up. You may use the concept if you do not want to have a report on these properties (although this may not be of any value to have properties that do not show up in the documentation).
Optional Element Summary | |
---|---|
String |
value The name of the property set. |
public abstract String value
There are two special values:
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: REQUIRED | OPTIONAL | DETAIL: ELEMENT |