Define an interface to represent the subelement.
For more information, see Defining an Element.
The interface that represents the subelement must extend the org.jvnet.hk2.config.ConfigBeanProxy interface.
In the interface that defines the parent element, identify the subelement to its parent element.
This example shows the declaration of the WombatElement interface to represent the wombat-element element.
... import org.jvnet.hk2.config.ConfigBeanProxy; import org.jvnet.hk2.config.Configured; ... @Configured public interface WombatElement extends ConfigBeanProxy { ... } ...
This example identifies the wombat-element element as a subelement.
... import org.jvnet.hk2.config.Element; ... import java.beans.PropertyVetoException; ... @Element public WombatElement getElement(); public void setElement(WombatElement element) throws PropertyVetoException; ...