15.2. What Can Be Annotated?
In Scala, you can annotate classes, methods, fields, local variables, and parameters, just like in Java.
@Entity class Credentials
@Test def testSomeFeature() {}
@BeanProperty var username = _
def doSomething(@NotNull message: String) {}
You are currently reading a PREVIEW of this book.
Get instant access to over
$1 million worth of books and videos.
Start a Free Trial