Last active
November 1, 2017 07:14
-
-
Save nklmish/288d254a57888adbccca313f2707503f 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
import javax.annotation.Nonnull; | |
import javax.annotation.meta.When; | |
public class Message { | |
private final String greetingMessage = "Hello "; | |
@Nonnull | |
public String getEchoMessage() { | |
return greetingMessage; | |
} | |
@Nonnull(when = When.MAYBE) | |
public String getThirdPartyMessage() { | |
return fetchFromExternalService(); | |
} | |
@Nonnull(when = When.UNKNOWN) | |
public String getDummyMessage() { | |
return "foo"; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment