Annotation Interface Configured


@Contract @Retention(RUNTIME) @Target(TYPE) @Inherited public @interface Configured
Marks inhabitants that require configuration for instantiation.
Author:
Kohsuke Kawaguchi
  • Optional Element Summary

    Optional Elements
    Modifier and Type
    Optional Element
    Description
    boolean
    Designates the configuration element as local element.
    XML element name that this configured object maps to.
    Designates that a configured component creates a new symbol space for given kinds of children.
  • Element Details

    • name

      String name
      XML element name that this configured object maps to. See Attribute.value() for how the default value is inferred.
      See Also:
      Default:
      ""
    • local

      boolean local
      Designates 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[] symbolSpace
      Designates that a configured component creates a new symbol space for given kinds of children.
      Default:
      {}