Android examples for java.lang.reflect:Annotation
get Annotation Value With Name
//package com.java2s; import java.lang.annotation.Annotation; public class Main { public static Object getAnnotationValueWithName(Annotation annotation, String valueName) {// w w w . j ava2 s. co m try { return annotation.annotationType().getMethod(valueName) .invoke(annotation); } catch (Exception e) { return null; } } }