@@ -120,7 +120,7 @@ public boolean isAbstract() {
120120 }
121121
122122 protected MClassRef <NType , NClass > createClassRef (Class <?> _class ) {
123- return new CMClassRef <NType , NClass >(getClazz (_class ),
123+ return new CMClassRef <NType , NClass >(getClazz (_class ), _class ,
124124 getPackage (_class ), getContainer (_class ), getLocalName (_class ));
125125 }
126126
@@ -137,8 +137,9 @@ protected MClassRef<NType, NClass> getTypeInfo(CClassRef info) {
137137 }
138138
139139 protected MClassRef <NType , NClass > createClassRef (CClassRef info ) {
140- return new CMClassRef <NType , NClass >(getClazz (info ), getPackage (info ),
141- getContainer (info ), getLocalName (info ));
140+ final NClass targetType = getClazz (info );
141+ return new CMClassRef <NType , NClass >(targetType , loadClass (targetType ),
142+ getPackage (info ), getContainer (info ), getLocalName (info ));
142143 }
143144
144145 @ Override
@@ -391,4 +392,14 @@ protected MClassTypeInfo<NType, NClass> createBaseTypeInfo(CClassInfo info) {
391392 return null ;
392393 }
393394 }
395+
396+ @ Override
397+ protected Class <?> loadClass (NType referencedType ) {
398+ final String name = referencedType .fullName ();
399+ try {
400+ return Class .forName (name );
401+ } catch (ClassNotFoundException cnfex ) {
402+ return null ;
403+ }
404+ }
394405}
0 commit comments