The hierarchy of ported classes and interfaces
In D and Java every object inherits from Object. This also implies, that a reference of type of an interface must be also compatible to this base Object. For ported classes this is more complicated. Javas Object and Ds Object do not have the same methods.
The solution is to hava an interface called JObject and a class JObjectImpl.
interface JObject{
// all method declarations from java Object.
}
class JObjectImpl : JObject {
// all method definitions from java Object.
}
Now let the converted make all ported classes inherit from JObjectImpl and all interfaces from JObject. Now, every ported object and interface is compatible to JObject.
Also it is easily possible to make classes used by ported classes, which do not inherit from JObjectImpl. This would be a problem for classes like JException and JThread, because they already have well defined base classes in the D hierarchy.
