java.module.annotation
Annotation Type ModuleAttribute


@Target(value={})
@Retention(value=RUNTIME)
public @interface ModuleAttribute

Indicates an attribute of a module definition. This metadata annotation is used as nested annotation inside other enclosing annotations.

Module attributes are generally defined by higher layers. To minimize the naming conflicts between module attributes, it is recommended that each module attribute should be defined with a fully qualified name.

For examples,

    @ModuleAttributes({
       @ModuleAttribute(name="org.opensource.license", value="GPL"),
       @ModuleAttribute(name="java.magic.number", value="CAFEBABE")
    })
    superpackage com.wombat.xyz {
       ...
    }
 

A module attribute may have locale-dependent value. To specify such module attribute, it should be declared with the name of the attribute, but not the value.

For examples,

    @ModuleAttributes({
       @ModuleAttribute(name="vendor.name")
    })
    superpackage com.wombat.xyz {
       ...
    }
 

The localized values of the module attributes are stored in a family of property-based resource bundles with the module's name as the base name. These resource bundles are called module attribute resource bundles.

Since:
1.7.0
Author:
Stanley M. Ho
See Also:
ModuleAttributes

Required Element Summary
 String name
          Name of the module attribute.
 
Optional Element Summary
 String value
          Value of the module attribute.
 

Element Detail

name

public abstract String name
Name of the module attribute.

value

public abstract String value
Value of the module attribute.

If the value is not specified, the value is stored in the module attribute resource bundle.

Default:
""