# Thursday, 06 April 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, 06 April 2006 14:42:05 (W. Europe Daylight Time, UTC+02:00)  #    Comments [2]
Friday, 07 April 2006 17:46:47 (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, 07 April 2006 17:51:48 (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).
Name
E-mail
Home page

I apologize for the lameness of this, but the comment spam was driving me nuts. In order to be able to post a comment, you need to answer a simple question. Hopefully this question is easy enough not to annoy serious commenters, but hard enough to keep the spammers away.

Anti-Spam Question: What method on java.lang.System returns an object's original hashcode (i.e. the one that would be returned by java.lang.Object.hashCode() if it wasn't overridden)? (case is significant)

Answer:  
Comment (HTML not allowed)  

Live Comment Preview