Java examples for java.lang.annotation:Field Annotation
is Constant Annotation Class Field
//package com.java2s; import java.lang.reflect.Field; import java.lang.reflect.Modifier; public class Main { public static boolean isConstantAnnotationClassField(Field field) { final int modifiers = field.getModifiers(); return Modifier.isFinal(modifiers) && Modifier.isPublic(modifiers) && Modifier.isStatic(modifiers) && field.getType().equals(Class.class); }/* w w w . ja v a 2s.c o m*/ }