Description
Allows bytecode manipulation at compile time using Project Lombok. Think of Lombok as AST transformations for Java source.
|
Works with Javac only. Eclipse compiler support is forthcoming. |
Installation
The current version of griffon-lombok-plugin is 0.1
To install just issue the following command
Usage
The Lombok plugin supports the following transformations
- @Threading - modifies the method body to execute its contents in the appropriate threading context.
- @ThreadingAware - injects the ThreadingHandler interface
- @EventPublisher - injects the EventPublisher interface
- @Bindable - injects the Observable interface.
In the case of @Bindable there are a couple of limitations at the moment that don't make it work exactly as its Groovy counterpart:
- inheritance is not honored. That is, if the super class is already Observable this annotation will still inject the required methods.
- the superclass will be set to
AbstractObservableif the annotated class has no extends clause. - Java has no concept of properties like Groovy does, @Bindable expects all private fields to be properties.
These rules means that the following Java code
gets compiled into
whereas this Java source
gets compiled to
History
Version |
Date |
Notes |
|---|---|---|
0.1 |
08-15-11 |
Initial release |