src/share/classes/java/lang/Package.java

Print this page




  60  * This versioning information is retrieved and made available
  61  * by the {@link ClassLoader} instance that
  62  * loaded the class(es).  Typically, it is stored in the manifest that is
  63  * distributed with the classes.
  64  *
  65  * <p>The set of classes that make up the package may implement a
  66  * particular specification and if so the specification title, version number,
  67  * and vendor strings identify that specification.
  68  * An application can ask if the package is
  69  * compatible with a particular version, see the {@link
  70  * #isCompatibleWith isCompatibleWith}
  71  * method for details.
  72  *
  73  * <p>Specification version numbers use a syntax that consists of nonnegative
  74  * decimal integers separated by periods ".", for example "2.0" or
  75  * "1.2.3.4.5.6.7".  This allows an extensible number to be used to represent
  76  * major, minor, micro, etc. versions.  The version specification is described
  77  * by the following formal grammar:
  78  * <blockquote>
  79  * <dl>
  80  * <dt><i>SpecificationVersion:
  81  * <dd>Digits RefinedVersion<sub>opt</sub></i>
  82 
  83  * <p><dt><i>RefinedVersion:</i>
  84  * <dd>{@code .} <i>Digits</i>
  85  * <dd>{@code .} <i>Digits RefinedVersion</i>
  86  *
  87  * <p><dt><i>Digits:
  88  * <dd>Digit
  89  * <dd>Digits</i>
  90  *
  91  * <p><dt><i>Digit:</i>
  92  * <dd>any character for which {@link Character#isDigit} returns {@code true},
  93  * e.g. 0, 1, 2, ...
  94  * </dl>
  95  * </blockquote>
  96  *
  97  * <p>The implementation title, version, and vendor strings identify an
  98  * implementation and are made available conveniently to enable accurate
  99  * reporting of the packages involved when a problem occurs. The contents
 100  * all three implementation strings are vendor specific. The
 101  * implementation version strings have no specified syntax and should
 102  * only be compared for equality with desired version identifiers.
 103  *
 104  * <p>Within each {@code ClassLoader} instance all classes from the same
 105  * java package have the same Package object.  The static methods allow a package
 106  * to be found by name or the set of all packages known to the current class
 107  * loader to be found.
 108  *
 109  * @see ClassLoader#definePackage
 110  */
 111 public class Package implements java.lang.reflect.AnnotatedElement {




  60  * This versioning information is retrieved and made available
  61  * by the {@link ClassLoader} instance that
  62  * loaded the class(es).  Typically, it is stored in the manifest that is
  63  * distributed with the classes.
  64  *
  65  * <p>The set of classes that make up the package may implement a
  66  * particular specification and if so the specification title, version number,
  67  * and vendor strings identify that specification.
  68  * An application can ask if the package is
  69  * compatible with a particular version, see the {@link
  70  * #isCompatibleWith isCompatibleWith}
  71  * method for details.
  72  *
  73  * <p>Specification version numbers use a syntax that consists of nonnegative
  74  * decimal integers separated by periods ".", for example "2.0" or
  75  * "1.2.3.4.5.6.7".  This allows an extensible number to be used to represent
  76  * major, minor, micro, etc. versions.  The version specification is described
  77  * by the following formal grammar:
  78  * <blockquote>
  79  * <dl>
  80  * <dt><i>SpecificationVersion:</i>
  81  * <dd><i>Digits RefinedVersion<sub>opt</sub></i>
  82 
  83  * <dt><i>RefinedVersion:</i>
  84  * <dd>{@code .} <i>Digits</i>
  85  * <dd>{@code .} <i>Digits RefinedVersion</i>
  86  *
  87  * <dt><i>Digits:</i>
  88  * <dd><i>Digit</i>
  89  * <dd><i>Digits</i>
  90  *
  91  * <dt><i>Digit:</i>
  92  * <dd>any character for which {@link Character#isDigit} returns {@code true},
  93  * e.g. 0, 1, 2, ...
  94  * </dl>
  95  * </blockquote>
  96  *
  97  * <p>The implementation title, version, and vendor strings identify an
  98  * implementation and are made available conveniently to enable accurate
  99  * reporting of the packages involved when a problem occurs. The contents
 100  * all three implementation strings are vendor specific. The
 101  * implementation version strings have no specified syntax and should
 102  * only be compared for equality with desired version identifiers.
 103  *
 104  * <p>Within each {@code ClassLoader} instance all classes from the same
 105  * java package have the same Package object.  The static methods allow a package
 106  * to be found by name or the set of all packages known to the current class
 107  * loader to be found.
 108  *
 109  * @see ClassLoader#definePackage
 110  */
 111 public class Package implements java.lang.reflect.AnnotatedElement {