aQute.bnd.annotation.metatype
Annotation Type Meta.AD
@Target(value=METHOD)
@Retention(value=RUNTIME)
public static @interface Meta.AD
The AD element in the Metatype specification.
|
Optional Element Summary |
int |
cardinality
The cardinality of the attribute. |
java.lang.String |
deflt
The default value. |
java.lang.String |
description
A description of the attribute. |
java.lang.String |
id
The id of the attribute. |
java.lang.String |
max
The maximum value. |
java.lang.String |
min
The minimum value. |
java.lang.String |
name
The name of the attribute. |
java.lang.String[] |
optionLabels
Provide labels for options. |
java.lang.String[] |
optionValues
The values of options. |
boolean |
required
Indicates that this attribute is required. |
Meta.Type |
type
The type of the field. |
description
public abstract java.lang.String description
- A description of the attribute. Default is empty.
- Returns:
- The description of the attribute.
- Default:
- "\u00ac\u00dfNULL\u00ac\u00df"
name
public abstract java.lang.String name
- The name of the attribute. By default the un-camel cased version of
the method name.
- Returns:
- the name
- Default:
- "\u00ac\u00dfNULL\u00ac\u00df"
id
public abstract java.lang.String id
- The id of the attribute. By default the name of the method. The id is
the key used to access the properties. This is the reason the AD is a
runtime annotation so the runtime can find the proper key.
- Returns:
- the id
- Default:
- "\u00ac\u00dfNULL\u00ac\u00df"
type
public abstract Meta.Type type
- The type of the field. This must be one of the basic types in the
metatype specification. By default, the type is derived from the
return type of the method. This includes most collections and arrays.
Unrecognized types are defaulted to String.
- Returns:
- the type to be used.
- Default:
- aQute.bnd.annotation.metatype.Meta.Type.String
cardinality
public abstract int cardinality
- The cardinality of the attribute. If not explicitly set it will be
derived from the attributes return type. Collections return
Integer.MIN_VALUE and arrays use Integer.MAX_VALUE.
If a single string needs to be converted to a Collection or array
then the | will be used as a separator to split the line.
- Returns:
- the cardinality of the attribute
- Default:
- 0
min
public abstract java.lang.String min
- The minimum value. This string must be converted to the attribute
type before comparison takes place.
- Returns:
- the min value
- Default:
- "\u00ac\u00dfNULL\u00ac\u00df"
max
public abstract java.lang.String max
- The maximum value. This string must be converted to the attribute
type before comparison takes place.
- Returns:
- the max value
- Default:
- "\u00ac\u00dfNULL\u00ac\u00df"
deflt
public abstract java.lang.String deflt
- The default value. This value must be converted to the return type of
the attribute. For multi valued returns use the | as separator.
- Returns:
- the default value
- Default:
- "\u00ac\u00dfNULL\u00ac\u00df"
required
public abstract boolean required
- Indicates that this attribute is required. By default attributes are
required.
- Returns:
- Default:
- true
optionLabels
public abstract java.lang.String[] optionLabels
- Provide labels for options. These labels must match the values. If no
labels are set, the un-cameled version of the values are used (if
they are set of course).
- Returns:
- the option labels
- Default:
- "\u00ac\u00dfNULL\u00ac\u00df"
optionValues
public abstract java.lang.String[] optionValues
- The values of options. If not set and the return type is an enum
class then the values will be derived from this return type.
- Returns:
- the option labels
- Default:
- "\u00ac\u00dfNULL\u00ac\u00df"
Copyright å© aQute SARL (2000, 2011). All Rights Reserved.