I'm learning scala. I want to put a java annotation (let's say lombok's @NotNull
) on scala method parameter. but when I write:
def a(@NotNull o : Object) = {}
I get a compilation error: trait NotNull is abstract; cannot be instantiated
.
ps. I'm not asking how to ensure not null in scala. I'm asking how to use java annotation