|
Lombok - v0.10.8 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: REQUIRED | OPTIONAL | DETAIL: ELEMENT |
public @interface val
Use val
as the type of any local variable declaration (even in a for-each statement), and the type will be inferred from the initializing expression.
For example: val x = 10.0;
will infer double
, and val y = new ArrayList<String>();
will infer ArrayList<String>
. The local variable
will also be made final.
Note that this is an interface because val x = 10;
will be desugared to @val int x = 10;
|
Lombok - v0.10.8 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: REQUIRED | OPTIONAL | DETAIL: ELEMENT |