ClassInfo ci = index.getClassByName( name );
if ( ci == null || ci.annotations() == null ) {
map = Collections.emptyMap();
}
else {
map = new HashMap<DotName, List<AnnotationInstance>>( ci.annotations() );
//here we ignore global annotations
for ( DotName globalAnnotationName : DefaultConfigurationHelper.GLOBAL_ANNOTATIONS ) {
if ( map.containsKey( globalAnnotationName ) ) {
map.put( globalAnnotationName, Collections.<AnnotationInstance>emptyList() );
}