Javadoc Tags
Context Tag
The context tag enables the declaration of a custom context interface classname that a component may safely cast a supplied context instance to.
Attributes
Attribute | Required | Description |
---|---|---|
type | no |
The classname of the interface that the component may cast a supplied context argument to. |
Example
package net.osm; /** * Example of a component declaring a custom context argument type. * * @avalon.component version="1.3" name="primary-component" */ public class Primary implements Contextualizable { /** * @avalon.context type="net.osm.CustomContext" */ public void contextualize( Context context ) throws ContextException { CustomContext custom = (CustomContext) context; ... } }
Generated meta-info type descriptor:
<type> <info> <version>1.3.0</version> <name>primary-component</name> </info> <context type="net.osm.CustomContext"/> </type>