Package org.jvnet.hk2.config
Annotation Type Element
-
-
Optional Element Summary
Optional Elements Modifier and Type Optional Element Description booleankeyIndicates that this property becomes the name of the component.booleanreferenceIndicates that this property is a reference to another configured inhabitant.booleanrequiredIndicates that this element is required.StringvalueElement name.booleanvariableExpansionIndicates that the variable expansion should be performed on this proeprty.
-
-
-
Element Detail
-
value
String value
Element name. SeeAttribute.value()for how the default value is inferred.- Default:
- ""
-
-
-
reference
boolean reference
Indicates that this property is a reference to another configured inhabitant.On XML, this is represented as a string value that points to the
value of the key propertyof the target inhabitant. See the following example:@Configured class VirtualHost { @Attribute(key=true) String name; } @Configured class HttpListener { @Attribute(reference=true) VirtualHost host; }- Default:
- false
-
-
-
variableExpansion
boolean variableExpansion
Indicates that the variable expansion should be performed on this proeprty.The configuration mechanism supports the Ant/Maven like
variable expansionin the configuration XML out of the box. Normally this happens transparently to objects in modules, hence this property is set to true by default.However, in a rare circumstance you might want to get values injected before the variables are expanded, in which case you can set this property to false to indicate so. Note that such property must be of type
String(or its collection/array.)Also note the inhabitants can always access the XML infoset by talking to
Domdirectly.- Default:
- true
-
-