@@ -120,7 +120,7 @@ public boolean isAbstract() {
120
120
}
121
121
122
122
protected MClassRef <NType , NClass > createClassRef (Class <?> _class ) {
123
- return new CMClassRef <NType , NClass >(getClazz (_class ),
123
+ return new CMClassRef <NType , NClass >(getClazz (_class ), _class ,
124
124
getPackage (_class ), getContainer (_class ), getLocalName (_class ));
125
125
}
126
126
@@ -137,8 +137,9 @@ protected MClassRef<NType, NClass> getTypeInfo(CClassRef info) {
137
137
}
138
138
139
139
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 ));
142
143
}
143
144
144
145
@ Override
@@ -391,4 +392,14 @@ protected MClassTypeInfo<NType, NClass> createBaseTypeInfo(CClassInfo info) {
391
392
return null ;
392
393
}
393
394
}
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
+ }
394
405
}
0 commit comments