in bytekit-core/src/main/java/com/alibaba/bytekit/utils/AsmAnnotationUtils.java [55:75]
public static <T> List<T> queryAnnotationValues(List<AnnotationNode> annotations, String annotationType,
String key) {
List<T> result = new ArrayList<T>();
if (annotations != null) {
for (AnnotationNode annotationNode : annotations) {
if (annotationNode.desc.equals(annotationType)) {
if (annotationNode.values != null) {
Iterator<Object> iterator = annotationNode.values.iterator();
while (iterator.hasNext()) {
String name = (String) iterator.next();
Object values = iterator.next();
if (key.equals(name)) {
result.add((T) values);
}
}
}
}
}
}
return result;
}