gw.util.AnnotationUtil Maven / Gradle / Ivy
/*
* Copyright 2014 Guidewire Software, Inc.
*/
package gw.util;
import gw.lang.reflect.IAnnotationInfo;
import gw.lang.reflect.IType;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
public class AnnotationUtil {
public static Map> map(List annotations) {
HashMap> map = new HashMap>();
for (IAnnotationInfo annotation : annotations) {
List infoList = map.get(annotation.getType());
if (infoList == null) {
infoList = new ArrayList();
map.put(annotation.getType(), infoList);
}
infoList.add(annotation);
}
return map;
}
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy