get Annotations from Field - Java java.lang.annotation

Java examples for java.lang.annotation:Field Annotation

Description

get Annotations from Field

Demo Code


//package com.java2s;
import java.lang.annotation.Annotation;
import java.lang.reflect.Field;

public class Main {

    public static Annotation[] getAnnotationsByField(Field field) {
        return field.getDeclaredAnnotations();
    }/*from  www . j a  v a2 s.  c o m*/
}

Related Tutorials