Skip to content

Instantly share code, notes, and snippets.

@aslakknutsen
Forked from pmuir/EventDecorator.java
Created September 16, 2011 20:23
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save aslakknutsen/1223049 to your computer and use it in GitHub Desktop.
Save aslakknutsen/1223049 to your computer and use it in GitHub Desktop.
@Decorates
class BarEventDecorator extends Event<Bar> {
@Inject @Delegate @Cool
Event<Bar> barEvent;
public void fire(Bar bar) {
// barEvent.fire(bar);
}
}
class Foo {
@Inject Event<Bar> e;
void doIt() {
e.fire(new Bar());
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment