Blocks :
|
Currently InstanceKlass contains two public methods for obtaining an InstanceKlass' PackageEntry or ModuleEntry. To avoid constantly casting a Klass * to an InstanceKlass, both package() and module() methods should be a virtual method on Klass. This will avoid the situation where a cast like the following must be made: ModuleEntry* module_entry = InstanceKlass::cast(klass)->module();