Package.IsAnnotationPresent(Class) Method

Definition

Determines whether an annotation of the requested type is present on this package.

[Android.Runtime.Register("isAnnotationPresent", "(Ljava/lang/Class;)Z", "GetIsAnnotationPresent_Ljava_lang_Class_Handler")]
public virtual bool IsAnnotationPresent(Java.Lang.Class? annotationClass);
[<Android.Runtime.Register("isAnnotationPresent", "(Ljava/lang/Class;)Z", "GetIsAnnotationPresent_Ljava_lang_Class_Handler")>]
abstract member IsAnnotationPresent : Java.Lang.Class -> bool
override this.IsAnnotationPresent : Java.Lang.Class -> bool

Parameters

annotationClass
Class

The Class object representing the requested annotation type.

Returns

true only if an annotation of the requested type is present on this package; otherwise, false.

Implements

Attributes

Exceptions

if annotationClass is null.

Remarks

Returns whether this package has an annotation of the requested type.

Added in 1.5.

Java documentation for java.lang.Package.isAnnotationPresent(java.lang.Class<? extends java.lang.annotation.Annotation>).

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