Udostępnij za pośrednictwem


URLClassLoader.DefinePackage(String, Manifest, URL) Method

Definition

Defines a new package by name in this ClassLoader.

[Android.Runtime.Register("definePackage", "(Ljava/lang/String;Ljava/util/jar/Manifest;Ljava/net/URL;)Ljava/lang/Package;", "GetDefinePackage_Ljava_lang_String_Ljava_util_jar_Manifest_Ljava_net_URL_Handler")]
protected virtual Java.Lang.Package? DefinePackage (string? name, Java.Util.Jar.Manifest? man, Java.Net.URL? url);
[<Android.Runtime.Register("definePackage", "(Ljava/lang/String;Ljava/util/jar/Manifest;Ljava/net/URL;)Ljava/lang/Package;", "GetDefinePackage_Ljava_lang_String_Ljava_util_jar_Manifest_Ljava_net_URL_Handler")>]
override this.DefinePackage : string * Java.Util.Jar.Manifest * Java.Net.URL -> Java.Lang.Package

Parameters

name
String

the package name

man
Manifest

the Manifest containing package version and sealing information

url
URL

the code source url for the package, or null if none

Returns

the newly defined Package object

Attributes

Exceptions

if a package with the given name already exists.

Remarks

Defines a new package by name in this ClassLoader. The attributes contained in the specified Manifest will be used to obtain package version and sealing information. For sealed packages, the additional URL specifies the code source URL from which the package was loaded.

Java documentation for java.net.URLClassLoader.definePackage(java.lang.String, java.util.jar.Manifest, 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