Android Guides | Samples

Java.Lang.Package Class

Contains information about a Java package.

See Also: Package

Syntax

[Android.Runtime.Register("java/lang/Package", DoNotGenerateAcw=true)]
public class Package : Object, IAnnotatedElement, IDisposable

Remarks

Contains information about a Java package. This includes implementation and specification versions. Typically this information is retrieved from the manifest.

Packages are managed by class loaders. All classes loaded by the same loader from the same package share a Package instance.

See Also

[Android Documentation]

Requirements

Namespace: Java.Lang
Assembly: Mono.Android (in Mono.Android.dll)
Assembly Versions: 0.0.0.0
Since: Added in API level 1

The members of Java.Lang.Package are listed below.

See Also: Object

Protected Constructors

A constructor used when creating managed representations of JNI objects; called by the runtime.

Public Properties

[read-only]
ImplementationTitleString. Returns the title of the implementation of this package, or null if this is unknown.
[read-only]
ImplementationVendorString. Returns the name of the vendor or organization that provides this implementation of the package, or null if this is unknown.
[read-only]
ImplementationVersionString. Returns the version of the implementation of this package, or null if this is unknown.
[read-only]
IsSealedBoolean. Indicates whether this package is sealed.
[read-only]
NameString. Returns the name of this package in the standard dot notation; for example: "java.lang".
[read-only]
SpecificationTitleString. Returns the title of the specification this package implements, or null if this is unknown.
[read-only]
SpecificationVendorString. Returns the name of the vendor or organization that owns and maintains the specification this package implements, or null if this is unknown.
[read-only]
SpecificationVersionString. Returns the version of the specification this package implements, or null if this is unknown.

Protected Properties

[read-only]
override
ThresholdClassIntPtr. This API supports the Mono for Android infrastructure and is not intended to be used directly from your code.
[read-only]
override
ThresholdTypeType. This API supports the Mono for Android infrastructure and is not intended to be used directly from your code.

Public Methods

GetAnnotation(Class) : Object
GetAnnotations() : IAnnotation[]
Returns an array of this package's annotations.
GetDeclaredAnnotations() : IAnnotation[]
Returns an array of this package's declared annotations.
static
GetPackage(String) : Package
Attempts to locate the requested package in the caller's class loader.
static
GetPackages() : Package[]
Returns all the packages known to the caller's class loader.
InvokeIsSealed(URL) : Boolean
Indicates whether this package is sealed with respect to the specified URL.
IsAnnotationPresent(Class) : Boolean
IsCompatibleWith(String) : Boolean
Indicates whether this package's specification version is compatible with the specified version string.