@Contract @Retention(value=RUNTIME) @Target(value=TYPE) @Inherited public @interface Configured
Modifier and Type | Optional Element and Description |
---|---|
boolean |
local
Designates the configuration element as local element.
|
String |
name
XML element name that this configured object maps to.
|
Class[] |
symbolSpace
Designates that a configured component creates
a new symbol space for given kinds of children.
|
public abstract String name
Attribute.value()
for how the default value is inferred.local()
public abstract boolean local
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()
.
public abstract Class[] symbolSpace
Copyright © 2009–2015 Oracle Corporation. All rights reserved.