}
Class clazz = serviceRegistry.getService( ClassLoaderService.class ).classForName( className );
DotName superName = null;
DotName[] interfaces = null;
short access_flag;
ClassInfo annClassInfo = index.getClassByName( classDotName );
if ( annClassInfo != null ) {
superName = annClassInfo.superName();
interfaces = annClassInfo.interfaces();
access_flag = annClassInfo.flags();
}
else {
Class superClass = clazz.getSuperclass();
if ( superClass != null ) {
superName = DotName.createSimple( superClass.getName() );
}
Class[] classInterfaces = clazz.getInterfaces();
if ( classInterfaces != null && classInterfaces.length > 0 ) {
interfaces = new DotName[classInterfaces.length];
for ( int i = 0; i < classInterfaces.length; i++ ) {
interfaces[i] = DotName.createSimple( classInterfaces[i].getName() );
}
}
access_flag = (short) ( clazz.getModifiers() | 0x20 );//(modifiers | ACC_SUPER)
}
Map<DotName, List<AnnotationInstance>> map = new HashMap<DotName, List<AnnotationInstance>>();
classInfoAnnotationsMap.put( classDotName, map );
ClassInfo classInfo = ClassInfo.create(
classDotName, superName, access_flag, interfaces, map
);
classes.put( classDotName, classInfo );
addSubClasses( superName, classInfo );
addImplementors( interfaces, classInfo );