# Thursday, April 6, 2006
« A Micro Optimization | Main | IKVM 0.28 rc1 »
@ikvm.lang.Internal

Hopefully someday Java will support more than the current simplistic scheme where classes are either public or non-public. In the meantime, I've added support to ikvmc for marking classes (and members) as internal (i.e. private to the assembly they live in). By marking a public class with the @ikvm.lang.Internal annotation ikvmc (and IKVM.Runtime.dll) will only allow access to the class by other code also living in the same assembly. I've also added a switch to ikvmc for making an entire package tree internal (the switch is named -privatepackage:<prefix>).

In addition, I've now enabled 1.5 support in the mainline version. Many of the 1.5 APIs that previously were only available on the GNU Classpath generics branch have been ported to the trunk, so it is starting to make more sense to enable 1.5 support in the VM by default.

The code is in cvs, although SourceForge has been having some problems, so it might not yet be available thru anoncvs. Development snapshot binaries are available here.

Thursday, April 6, 2006 2:42:05 PM (W. Europe Daylight Time, UTC+02:00)  #    Comments [2]
Friday, April 7, 2006 5:46:47 PM (W. Europe Daylight Time, UTC+02:00)
Doesn't the nonspecified access control function basically the same as internal? I.e. the package and class get access, but nothing else does? Or are package-level and assembly-level too different for reconciliation?
Tak
Friday, April 7, 2006 5:51:48 PM (W. Europe Daylight Time, UTC+02:00)
In order to be compatible with Java I cannot allow other packages to access package private types or members, but you are correct that they are somewhat similar and this is why @Internal types and members look like package accessible types and members, but they are different in that IKVM does allow you to access them across packages (both thru static binding and thru reflection).
Comments are closed.