Java Reflection Annotation getAnnotations(Method method)

Here you can find the source of getAnnotations(Method method)

Description

get Annotations

License

Apache License

Declaration

public static Annotation[] getAnnotations(Method method) 

Method Source Code


//package com.java2s;
//License from project: Apache License 

import java.lang.annotation.Annotation;
import java.lang.reflect.Method;

public class Main {
    public static Annotation[] getAnnotations(Method method) {
        return method.getDeclaredAnnotations();
    }/* w  ww.j  a  v  a 2 s  .c o m*/
}

Related

  1. getAnnotations(final Class c, final Class annClass)
  2. getAnnotations(final Class clazz, final Class annotation)
  3. getAnnotations(final Class clazz, final String fieldName)
  4. getAnnotations(Method method)
  5. getAnnotations(Method method)
  6. getAnnotations(Method method)
  7. getAnnotations(Object instance)
  8. getAnnotations(Set fields, Set methods)
  9. getAnnotationsOf(Class annoClass)