Javadoc Tags

Attribute Tag

An attribute may be declared within an interface or class. When declared under an interface the attribute will be included in the generated service defintion. When declared under a class, the attribute will be included in the info element of the type defintion.

Attributes

Attribute Required Description
key yes

The attribute lookup key.

value no

The attribute value. If not declared, a null value is assumed.

Example

package org.apache.avalon.playground;

/**
 * Example of the declaration of a series of attributes.
 *
 * @avalon.attribute key="description" value="an example"
 * @avalon.attribute key="color" value="red"
 * @avalon.attribute key="priority" value="normal"
 */
public interface MyService
{
  ...
}

Generated meta-info when declared within an interface:

<service>
  <attributes>
    <attribute name="description" value="an example"/>
    <attribute name="color" value="red"/>
    <attribute name="priority" value="normal"/>
  </attributes>
</service>

Generated meta-info when declared within an class:

<type>
  <info>
    <attributes>
      <attribute name="description" value="an example"/>
      <attribute name="color" value="red"/>
      <attribute name="priority" value="normal"/>
    </attributes>
  </info>
</type>