Created
January 26, 2012 15:05
-
-
Save mathieuancelin/1683171 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@Inject Event<String> evt; | |
@Inject Event<Message> evtMess; | |
evt.fire("Hello World"); | |
evtMess.fire(new Message("Hello")); | |
public void listenAllStrings(@Observes String evt) { } | |
public void listenAllMessages(@Observes Message message) { } | |
@Inject @Old Event<String> evt; | |
evt.fire("Hello Old Man"); | |
public void listenAllString(@Observes String evt) { } | |
public void listenOldString(@Observes @Old String evt) { } | |
@Inject @Old @For(Person.JOHN_DOE) Event<String> evt; | |
evt.fire("Hello Old John Doe"); | |
public void listenAllString(@Observes String evt) { } | |
public void listenOldString(@Observes @Old String evt) { } | |
public void listenOldStringForJohnDoe(@Observes @Old @For(Person.JOHN_DOE) String evt) { } | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment