AnnotationReflector reflector = AnnotationReflector.getDefaultReflector();
Set<Class<?>> configClasses = reflector.getReflector().getTypesAnnotatedWith(Config.class);
for (Class<?> configClass : configClasses) {
Annotation annotation = configClass.getAnnotation(Config.class);
if (annotation instanceof Config) {
Config configValueAnnotation = (Config) annotation;
// extract config type
Class<?> configType = configValueAnnotation.searchType();
if (configType == Object.class) {
configType = configClass;
}
// extract description
String description = configValueAnnotation.description();
if (description.length() == 0) {
description = configType.getSimpleName();
}
// store
Class<?> old = result.put(configType.getSimpleName(), configType);