de.smartics.properties.api.core.annotations
Annotation Type PropertySet


@Documented
@Target(value={TYPE,METHOD})
@Retention(value=RUNTIME)
public @interface PropertySet

Defines a set of properties.

Purpose

All interfaces that provide access to properties are required to be annotated by this annotation.

 
   
   

Example

@PropertySet("myprops")
public interface MyProperties {
...
}

Name Values

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 {
...
}

Annotated Elements

The annotation may be placed at type or method level.

Type Level Annotation

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.

Method Level Annotation

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.
 

value

public abstract String value
The name of the property set.

There are two special values:

Default:
" "


Copyright © 2012-2013 Kronseder & Reiner GmbH - smartics. All Rights Reserved.