Package org.jvnet.hk2.config
Annotation Interface Configured
Marks inhabitants that require configuration for instantiation.
- Author:
- Kohsuke Kawaguchi
-
Optional Element Summary
Optional ElementsModifier and TypeOptional ElementDescriptionbooleanDesignates the configuration element as local element.XML element name that this configured object maps to.Class[]Designates that a configured component creates a new symbol space for given kinds of children.
-
Element Details
-
name
String nameXML element name that this configured object maps to. SeeAttribute.value()for how the default value is inferred.- See Also:
- Default:
- ""
-
local
boolean localDesignates the configuration element as local element.By default, element names for configured inhabitant are global, meaning component can be referenced from anywhere that allow a valid substitution, such as:
@Element("*") List<Object> any;Setting this flag to true will prevent this, and instead make this element local. Such configuration inhabitants will not have any associated element name, and therefore can only participate in the configuration XML when explicitly referenced from its parent. For example:
@Configured class Foo { @Element List<Property> properties; } @Configured(local=true) class Property { @FromAttribute String name; @FromAttribute String value; } <foo> <property name="aaa" value="bbb" /> </foo>This switch is mutually exclusive with
name().- Default:
- false
-
symbolSpace
Class[] symbolSpaceDesignates that a configured component creates a new symbol space for given kinds of children.- Default:
- {}
-