Java examples for java.lang.annotation:Field Annotation
is Constant Annotation String Field
//package com.java2s; import java.lang.reflect.Field; import java.lang.reflect.Modifier; public class Main { public static boolean isConstantAnnotationStringField(Field field) { final int modifiers = field.getModifiers(); return Modifier.isFinal(modifiers) && Modifier.isPublic(modifiers) && Modifier.isStatic(modifiers) && field.getType().equals(String.class); }//ww w .j av a 2s. c om }