2006-10-27 00:48

AliasJava Demo

This was a demo of an annotation system for managing encapsulation of data.

The classical example is that a private field can hold a reference to what is intended to be private data, but that any accessor can return an alias to the private data.

AliasJava allows you to annotate fields and methods to indicate who is allowed to alias the data, and this will be enforced by tooling/compiler.

Annotations can only be inserted at declaration points! That’s why we cannot put “unchecked” annotations before certain statements, only declarations…that was a useful lesson.

AliasJava does look to me like it is to much clutter in the code in comparison to the usefulness it provides.


Back