java.module.annotation
Annotation Type VersionConstraint


@Retention(value=RUNTIME)
public @interface VersionConstraint

Indicates the version constraint of an import in a module definition. The version constraint is either a version, a version range, or a combination of both, following the format described in the VersionConstraint class. This metadata annotation is applied to the import of the development module, i.e. the superpackage construct.

For examples,

    superpackage com.wombat.xyz {
       @VersionConstraint("1.0+")
       import org.foo.library; 
       ...
    }

    superpackage com.wombat.xyz {
       @VersionConstraint("1.2.*")
       import org.foo.library; 
       ...
    }

    superpackage com.wombat.xyz {
       @VersionConstraint("[1.2.0, 2.0.0)")
       import org.foo.library; 
       ...
    }
 

Since:
1.7.0
Author:
Stanley M. Ho
See Also:
Version, VersionConstraint

Required Element Summary
 String value
          Version constraint of the import in the module definition.
 

Element Detail

value

public abstract String value
Version constraint of the import in the module definition.