Symbolic annotation processor
bsrbnd
bsrbnd at gmail.com
Thu Dec 10 13:50:06 UTC 2015
Hi,
Following our discussion (October 2015), I wrote an
annotation-processor (only a draft for now) that gives a symbolic view
of class members, for example:
@Symbolic private Object myField;
@Symbolic("_") private void myMethod(Object param) {}
We can either access the name or the reflective object of members the
following way:
String name = $myField.toString(); // $ is the default prefix
Method m = _myMethod.reflect(); // _ is a custom prefix, useful for
overloaded identifiers
You can find a simple example here:
https://github.com/bsrbnd/draft/blob/master/src/examples/Example.java
Full source code of the annotation-processor prototype is given there:
https://github.com/bsrbnd/draft
Comments are welcome, but I know this is probably not the right
mailing-list for that.
Regards,
Bernard
More information about the compiler-dev
mailing list