Last active
November 1, 2017 05:09
-
-
Save nklmish/a69bd2cfd6994c3554943305386a0295 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(when = When.ALWAYS) //When.ALWAYS is default option and makes the annotated type as non-nullable | |
public String getEchoMessage() { | |
return greetingMessage; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment