Skip to content

Instantly share code, notes, and snippets.

@aslakknutsen
Forked from pmuir/EventDecorator.java
Created September 16, 2011 20:23
Show Gist options
  • 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