Package | Description |
---|---|
java.lang |
REVISED Provides classes that are fundamental to the design of the Java
programming language.
|
java.net |
REVISED Provides the classes for implementing networking applications.
|
Modifier and Type | Method | Description |
---|---|---|
protected Package |
ClassLoader.definePackage(String name,
String specTitle,
String specVersion,
String specVendor,
String implTitle,
String implVersion,
String implVendor,
URL sealBase) |
|
Package |
ClassLoader.getDefinedPackage(String name) |
|
Package[] |
ClassLoader.getDefinedPackages() |
NEW Returns all of the
Package s defined by this class loader. |
Package |
Class.getPackage() |
REVISED Gets the package of this class.
|
protected Package |
ClassLoader.getPackage(String name) |
Deprecated.
REVISED If multiple class loaders delegate to each other and define classes
with the same package name, and one such loader relies on the lookup
behavior of
getPackage to return a Package from
a parent loader, then the properties exposed by the Package
may not be as expected in the rest of the program.
For example, the Package will only expose annotations from the
package-info.class file defined by the parent loader, even if
annotations exist in a package-info.class file defined by
a child loader. A more robust approach is to use the
ClassLoader.getDefinedPackage(java.lang.String) method which returns
a Package for the specified class loader. |
static Package |
Package.getPackage(String name) |
Deprecated.
REVISED If multiple class loaders delegate to each other and define classes
with the same package name, and one such loader relies on the lookup
behavior of
getPackage to return a Package from
a parent loader, then the properties exposed by the Package
may not be as expected in the rest of the program.
For example, the Package will only expose annotations from the
package-info.class file defined by the parent loader, even if
annotations exist in a package-info.class file defined by
a child loader. A more robust approach is to use the
ClassLoader.getDefinedPackage(java.lang.String) method which returns
a Package for the specified class loader. |
protected Package[] |
ClassLoader.getPackages() |
REVISED Returns all of the
Package s defined by this class loader
and its ancestors. |
static Package[] |
Package.getPackages() |
REVISED Returns all of the
Package s defined by the caller's class loader
and its ancestors. |
Modifier and Type | Method | Description |
---|---|---|
protected Package |
URLClassLoader.definePackage(String name,
Manifest man,
URL url) |
REVISED Defines a new package by name in this
URLClassLoader . |
Copyright © 1993, 2017, Oracle and/or its affiliates · All rights reserved · License