java.lang.Object
|
+--java.lang.Package
Package objects contain version information
about the implementation and specification of a Java package.
This versioning information is retrieved and made available
by the classloader that loaded the class(es). Typically, it is
stored in the manifest that is distributed with the classes.
The set of classes that make up the package may implement a
particular specification and if
so the specification title, version number, and vendor strings
identify that specification.
An application can ask if the package is
compatible with a particular version, see the isCompatibleWith
method for details.
Specification version numbers use a "Dewey Decimal" syntax that consists of positive decimal integers separated by periods ".", for example, "2.0" or "1.2.3.4.5.6.7". This allows an extensible number to be used to represent major, minor, micro, etc versions. The version number must begin with a number.
The implementation title, version, and vendor strings identify an implementation and are made available conveniently to enable accurate reporting of the packages involved when a problem occurs. The contents all three implementation strings are vendor specific. The implementation version strings have no specified syntax and should only be compared for equality with desired version identifers. Within each classloader all classes from the same java package have the same Package object. The static methods allow a package to be found by name or the set of all packages known to the current class loader to be found.
ClassLoader.definePackage(java.lang.String, java.lang.String, java.lang.String, java.lang.String, java.lang.String, java.lang.String, java.lang.String, java.net.URL)
| Method Summary | |
String |
getImplementationTitle()
copy-> .getImplementationTitle()copy-> <String var>=<Package>.getImplementationTitle();
|
String |
getImplementationVendor()
copy-> .getImplementationVendor()copy-> <String var>=<Package>.getImplementationVendor();
|
String |
getImplementationVersion()
copy-> .getImplementationVersion()copy-> <String var>=<Package>.getImplementationVersion();
|
String |
getName()
copy-> .getName()copy-> <String var>=<Package>.getName();
|
static Package |
getPackage(String name)
copy-> Package.getPackage( )copy-> <Package var>=Package.getPackage(<String name>);
|
static Package[] |
getPackages()
copy-> Package.getPackages()copy-> <Package var>=Package.getPackages();
|
String |
getSpecificationTitle()
copy-> .getSpecificationTitle()copy-> <String var>=<Package>.getSpecificationTitle();
|
String |
getSpecificationVendor()
copy-> .getSpecificationVendor()copy-> <String var>=<Package>.getSpecificationVendor();
|
String |
getSpecificationVersion()
copy-> .getSpecificationVersion()copy-> <String var>=<Package>.getSpecificationVersion();
|
int |
hashCode()
copy-> .hashCode()copy-> <int var>=<Package>.hashCode(); |
boolean |
isCompatibleWith(String desired)
copy-> .isCompatibleWith( )copy-> <boolean var>=<Package>.isCompatibleWith(<String desired>);
|
boolean |
isSealed()
copy-> .isSealed()copy-> <boolean var>=<Package>.isSealed();
|
boolean |
isSealed(URL url)
copy-> .isSealed( )copy-> <boolean var>=<Package>.isSealed(<URL url>);
|
String |
toString()
copy-> .toString()copy-> <String var>=<Package>.toString(); |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, notify, notifyAll, wait, wait, wait |