Annotation Interface Attribute
- Author:
- Kohsuke Kawaguchi
- See Also:
-
Optional Element Summary
Optional ElementsModifier and TypeOptional ElementDescriptionSpecifies the data type.Specifies the default value of the attribute.booleanIndicates that this property becomes the name of the component.booleanIndicates that this property is a reference to another configured inhabitant.booleanIndicates that this attribute is required.Attribute name.booleanIndicates that the variable expansion should be performed on this proeprty.
-
Element Details
-
value
String valueAttribute name.Default Name
If this value is omitted, the default name is inferred from the field/method name. First, if this is a method and the name starts with "set", then "set" will be trimmed off.
Then names are tokenized according to the camel case word separator, then tokens are combined with '-', then finally the whole thing is converted to the lower case.
Therefore, for example, a field name "httpBufferSize" would yield "http-buffer-size", and a method name "setThreadCount" would yield "thread-count"
- Default:
- ""
-
key
boolean keyIndicates that this property becomes the name of the component. There can be only one key on a class.- Default:
- false
-
required
boolean requiredIndicates that this attribute is required.To specify the default value, simply use the field initializer to set it to a certain value. The field/method values are only set when the value is present.
- Default:
- false
-
reference
boolean referenceIndicates that this property is a reference to another configured inhabitant. SeeElement.reference()for more details of the semantics.When a reference property is a collection/array, then the key values are separated by ',' with surrounding whitespaces ignored. That is, it can be things like " foo , bar " (which would mean the same thing as "foo,bar".)
- Default:
- false
-
variableExpansion
boolean variableExpansionIndicates that the variable expansion should be performed on this proeprty. SeeElement.variableExpansion()for more details.- Default:
- true
-
defaultValue
String defaultValueSpecifies the default value of the attribute.- Returns:
- default value as String
- Default:
- "\u0000"
-
dataType
Class dataTypeSpecifies the data type. It should be the fully qualified name of the class that identifies the real data type. For attributes that are of type defined by basic Java primitives (or wrappers), there is no need to specify this field. The default value is derived from method/field declaration.- Returns:
- String specifying the name of the data type for the values of this attribute
- Default:
- java.lang.String.class
-