| java.lang.Object | |
| ↳ | java.lang.Package |
This class must be implemented by the vm vendor. An instance of class Package contains information about a Java package. This includes implementation and specification versions. Typically this information is retrieved from the manifest.
Packages are managed by class loaders. All classes loaded by the same loader from the same package share a Package instance.
| Public Methods | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
Gets the annotation associated with the given annotation type and this
package.
| |||||||||||
Gets all of the annotations associated with this package.
| |||||||||||
Gets all of the annotations directly declared on this element.
| |||||||||||
Return the title of the implementation of this package, or null if this
is unknown.
| |||||||||||
Return the name of the vendor or organization that provided this
implementation of the package, or null if this is unknown.
| |||||||||||
Return the version of the implementation of this package, or null if this
is unknown.
| |||||||||||
Return the name of this package in the standard dot notation; for
example: "java.lang".
| |||||||||||
Attempt to locate the requested package in the caller's class loader.
| |||||||||||
Return all the packages known to the caller's class loader.
| |||||||||||
Return the title of the specification this package implements, or null if
this is unknown.
| |||||||||||
Return the name of the vendor or organization that owns and maintains the
specification this package implements, or null if this is unknown.
| |||||||||||
Return the version of the specification this package implements, or null
if this is unknown.
| |||||||||||
Returns an integer hash code for the receiver.
| |||||||||||
Indicates whether or not the given annotation is present.
| |||||||||||
Return true if this package's specification version is compatible with
the specified version string.
| |||||||||||
Return true if this package is sealed, false otherwise.
| |||||||||||
Return true if this package is sealed with respect to the specified URL,
false otherwise.
| |||||||||||
Returns a string containing a concise, human-readable description of the
receiver.
| |||||||||||
|
[Expand]
Inherited Methods | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
From class java.lang.Object
| |||||||||||
From interface java.lang.reflect.AnnotatedElement
| |||||||||||
Gets the annotation associated with the given annotation type and this package.
| annotationType | The Class instance of the annotation to search for. |
|---|
null.Gets all of the annotations associated with this package.
Gets all of the annotations directly declared on this element.
Return the title of the implementation of this package, or null if this is unknown. The format of this string is unspecified.
Return the name of the vendor or organization that provided this implementation of the package, or null if this is unknown. The format of this string is unspecified.
Return the version of the implementation of this package, or null if this is unknown. The format of this string is unspecified.
Return the name of this package in the standard dot notation; for example: "java.lang".
Attempt to locate the requested package in the caller's class loader. If no package information can be located, null is returned.
| packageName | The name of the package to find |
|---|
Return all the packages known to the caller's class loader.
Return the title of the specification this package implements, or null if this is unknown.
Return the name of the vendor or organization that owns and maintains the specification this package implements, or null if this is unknown.
Return the version of the specification this package implements, or null if this is unknown. The version string is a sequence of non-negative integers separated by dots; for example: "1.2.3".
Returns an integer hash code for the receiver. Any two objects which
answer true when passed to equals must
answer the same value for this method.
Indicates whether or not the given annotation is present.
| annotationType | The class instance of the annotation to search for. |
|---|
true if the annotation is present,
otherwise false.Return true if this package's specification version is compatible with the specified version string. Version strings are compared by comparing each dot separated part of the version as an integer.
| version | The version string to compare against |
|---|
| NumberFormatException | if the package's version string or the one provided is not in the correct format |
|---|
Return true if this package is sealed, false otherwise.
Return true if this package is sealed with respect to the specified URL, false otherwise.
| url | the URL to test |
|---|
Returns a string containing a concise, human-readable description of the receiver.