koresframework/Kores

Add some 'Class' methods to CodeType

Closed this issue · 0 comments

The implementation of Class methods like isAssignableFrom was avoided because CodeType can have different implementations (LoadedCodeType, PlainCodeType, TypeDeclaration, and so on), but in version 4.0 the type resolution will be implemented and it brings the possibility to implement methods like isAssignableFrom, for PlainCodeType, an exception will be throw (only if the type cannot be resolved). Other methods like getSupertype and getInterfaces may be implemented. TypeDeclaration does not extends SuperClassHolder and ImplementationHolder, this means that some TypeDeclarations does not have superclass and superinterfaces, then we will implement isAssignableFrom, getSuperClass and getInterfaces in CodeTypeResolver, all CodeTypes will have a defaultResolver that holds the default CodeTypeResolver provided by the implementation.