ClassLoader.DefinePackage Method

Definition

Defines a package by name in this ClassLoader.

[Android.Runtime.Register("definePackage", "(Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/net/URL;)Ljava/lang/Package;", "GetDefinePackage_Ljava_lang_String_Ljava_lang_String_Ljava_lang_String_Ljava_lang_String_Ljava_lang_String_Ljava_lang_String_Ljava_lang_String_Ljava_net_URL_Handler")]
protected virtual Java.Lang.Package? DefinePackage (string? name, string? specTitle, string? specVersion, string? specVendor, string? implTitle, string? implVersion, string? implVendor, Java.Net.URL? sealBase);
[<Android.Runtime.Register("definePackage", "(Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/net/URL;)Ljava/lang/Package;", "GetDefinePackage_Ljava_lang_String_Ljava_lang_String_Ljava_lang_String_Ljava_lang_String_Ljava_lang_String_Ljava_lang_String_Ljava_lang_String_Ljava_net_URL_Handler")>]
abstract member DefinePackage : string * string * string * string * string * string * string * Java.Net.URL -> Java.Lang.Package
override this.DefinePackage : string * string * string * string * string * string * string * Java.Net.URL -> Java.Lang.Package

Parameters

name
String

The package name

specTitle
String

The specification title

specVersion
String

The specification version

specVendor
String

The specification vendor

implTitle
String

The implementation title

implVersion
String

The implementation version

implVendor
String

The implementation vendor

sealBase
URL

If not null, then this package is sealed with respect to the given code source java.net.URL <tt>URL</tt> object. Otherwise, the package is not sealed.

Returns

The newly defined Package object

Attributes

Exceptions

if a package with the specified name already exists.

Remarks

Defines a package by name in this ClassLoader. This allows class loaders to define the packages for their classes. Packages must be created before the class is defined, and package names must be unique within a class loader and cannot be redefined or changed once created.

Added in 1.2.

Java documentation for java.lang.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).

Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.

Applies to