A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/Package.html below:

Package (Java SE 17 & JDK 17)

All Implemented Interfaces:
AnnotatedElement

Represents metadata about a run-time package associated with a class loader. Metadata includes annotations, versioning, and sealing.

Annotations for the run-time package are read from package-info.class at the same code source as classes in the run-time package.

The set of classes that make up the run-time package may implement a particular specification. The specification title, version, and vendor (indicating the owner/maintainer of the specification) can be provided when the Package is defined. An application can ask if the Package is compatible with a particular specification version by using the Package.isCompatibleWith(String) method. In addition, information about the actual classes that make up the run-time package can be provided when the Package is defined. This information consists of an implementation title, version, and vendor (indicating the supplier of the classes).

A Package may be explicitly defined with the ClassLoader.definePackage(String, String, String, String, String, String, String, URL) method. The caller supplies the specification and implementation titles, versions, and vendors. The caller also indicates whether the package is sealed. If a Package is not explicitly defined for a run-time package when a class in that run-time package is defined, then a Package is automatically defined by the class's defining class loader, as follows.

A Package automatically defined for classes in a named module has the following properties:

A Package automatically defined for classes in an unnamed module has the following properties:

A Package can be obtained with the Package.getPackage(String) and ClassLoader.getDefinedPackage(String) methods. Every Package defined by a class loader can be obtained with the Package.getPackages() and ClassLoader.getDefinedPackages() methods.

Implementation Note:
The builtin class loaders do not explicitly define Package objects for packages in named modules. Instead those packages are automatically defined and have no specification and implementation versioning information.
See Java Virtual Machine Specification:
5.3 Creation and Loading
Since:
1.2
See Also:

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4