Here you can find the source of getAnnotationDefaultMap(Class
public static <T extends Annotation> Map<String, Object> getAnnotationDefaultMap(Class<T> annotationClass)
//package com.java2s; //License from project: Apache License import java.lang.annotation.Annotation; import java.util.Map; import java.util.stream.Collectors; import java.util.stream.Stream; public class Main { public static <T extends Annotation> Map<String, Object> getAnnotationDefaultMap(Class<T> annotationClass) { return Stream.of(annotationClass.getDeclaredMethods()).filter(m -> m.getDefaultValue() != null) .collect(Collectors.toMap(m -> m.getName(), m -> m.getDefaultValue())); }// ww w . j a va2 s .c o m }