Java examples for java.lang.annotation:Annotation Attribute
Check if Annotation array contains an Annotation
//package com.java2s; import java.lang.annotation.Annotation; public class Main { public static boolean contains(Annotation[] array, Class<? extends Annotation> type) { for (Annotation annotation : array) { if (annotation.annotationType().equals(type)) { return true; }// www .ja va 2 s.c om } return false; } }