Condividi tramite


Package.GetPackages Method

Definition

Get all the packages currently known for the caller's ClassLoader instance.

[Android.Runtime.Register("getPackages", "()[Ljava/lang/Package;", "")]
public static Java.Lang.Package[]? GetPackages ();
[<Android.Runtime.Register("getPackages", "()[Ljava/lang/Package;", "")>]
static member GetPackages : unit -> Java.Lang.Package[]

Returns

a new array of packages known to the callers ClassLoader instance. An zero length array is returned if none are known.

Attributes

Remarks

Get all the packages currently known for the caller's ClassLoader instance. Those packages correspond to classes loaded via or accessible by name to that ClassLoader instance. If the caller's ClassLoader instance is the bootstrap ClassLoader instance, which may be represented by null in some implementations, only packages corresponding to classes loaded by the bootstrap ClassLoader instance will be returned.

Java documentation for java.lang.Package.getPackages().

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

See also