Class.IsAnnotationPresent(Class) Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Determines whether an annotation of the requested type is present on this class.
[Android.Runtime.Register("isAnnotationPresent", "(Ljava/lang/Class;)Z", "")]
public bool IsAnnotationPresent(Java.Lang.Class annotationClass);
[<Android.Runtime.Register("isAnnotationPresent", "(Ljava/lang/Class;)Z", "")>]
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 class; otherwise, false.
Implements
- Attributes
Exceptions
if annotationClass is null.
Remarks
For an inherited annotation type, an annotation inherited from a superclass is considered present.
Added in 1.5.
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.