JavaOne

EnfranchisedMind's Adventures at JavaOne 
« Back to blog

Modularity: JSR-294 and Beyond 4

Modules will be able to "provide" other names, which creates a way to swap implementations. It may also support annotations.
 
Moving on now: versioning. Chapter 13 of the Java Language Spec specifies what it means for two class files to be "binary compatible". Specifically, it outlaws removing members and changing signatures and thrown exceptions. Versioning specifies the amount of change and the style (signature vs. behavior).
 
Modules can be versioned:
module com.smokejumperit.foo @ 1.0 {
  ...
  requires module jdom @ 1.0;
  ...
}
 
Problems with versions: structure (shape/name), ordering (1.6:u13  
Finally, accessibility: a new visibility level will be allowed called "module", which makes it module-private. Basically, that means it is missing in the outside world, but visible in the local world. Also, there's a 'package' level being proposed which would be module-private and limited into the given package.

Loading mentions Retweet

Comments (0)

Leave a comment...

 
Got an account with one of these? Login here, or just enter your comment below.
Posterous-login    Connect    twitter