Java examples for java.lang.annotation:Field Annotation
is Constant Annotation Int Field
//package com.java2s; import java.lang.reflect.Field; import java.lang.reflect.Modifier; public class Main { public static boolean isConstantAnnotationIntField(Field field) { final int modifiers = field.getModifiers(); return Modifier.isFinal(modifiers) && Modifier.isPublic(modifiers) && Modifier.isStatic(modifiers) && field.getType().equals(Integer.TYPE); }/*w ww.j av a2s . co m*/ }