Here you can find the source of getAnnotations(Field field)
public static Annotation[] getAnnotations(Field field)
//package com.java2s; import java.lang.annotation.Annotation; import java.lang.reflect.Field; import java.lang.reflect.Method; public class Main { public static Annotation[] getAnnotations(Field field) { return field.getAnnotations(); }//from w w w . j a va 2 s .co m public static Annotation[] getAnnotations(Method method) { return method.getAnnotations(); } }