Parameter.IsAnnotationPresent(Class) Method

Definition

Returns true if an annotation of the specified type is present on this parameter; otherwise, returns false.

public bool IsAnnotationPresent(Java.Lang.Class annotationClass);
abstract member IsAnnotationPresent : Java.Lang.Class -> bool
override this.IsAnnotationPresent : Java.Lang.Class -> bool

Parameters

annotationClass
Class

the Class object corresponding to the annotation type

Returns

true if an annotation of the specified annotation type is present on this parameter; otherwise, false

Implements

Remarks

Returns true if an annotation of the specified type is present on this parameter; otherwise, returns false. This is equivalent to GetAnnotation(annotationClass) != null.

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