Wednesday Sep 24, 2008

Many annotations are referentially @Opaque

Often Java elements (such as classes or methods) have meaning beyond their "denotational semantics": the name (or, occasionally, just presence) of the element itself is significant to how the application runs, beyond simple references from other Java source code. For example, a field marked with @javax.persistence.Column cannot be freely renamed or shuffled around according to traditional refactoring tools.

It would be great if there were a consistent way to mark these kinds of annotations. Authors of Java frameworks could then indicate to tools that Java elements marked with them need to be treated conservatively.

My suggestion is to introduce a meta-annotation (i.e. annotation placed on other annotations): @Opaque. Here is source code for the annotation and some possible example usages.

About

jglick

Search

Categories
Archives
« April 2014
SunMonTueWedThuFriSat
  
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
   
       
Today