diff options
author | Reinier Zwitserloot <reinier@zwitserloot.com> | 2010-11-29 16:43:36 +0100 |
---|---|---|
committer | Reinier Zwitserloot <reinier@zwitserloot.com> | 2010-11-29 16:43:36 +0100 |
commit | 7dba9c850c675cc8066fa3e7c79e836bb7ad8203 (patch) | |
tree | 391777ff50fa383b328e4925adbd296f1fcb3c3f /website/features/val.html | |
parent | 5e9b99bec80fe488f3fcd173f81adb623b30254c (diff) | |
download | lombok-7dba9c850c675cc8066fa3e7c79e836bb7ad8203.tar.gz lombok-7dba9c850c675cc8066fa3e7c79e836bb7ad8203.tar.bz2 lombok-7dba9c850c675cc8066fa3e7c79e836bb7ad8203.zip |
Added 'val' as a type which the 'val' fake keyword must resolve to before val works,
as a gesture to make val less 'magical'. It even works, in eclipse. Next up: javac.
Diffstat (limited to 'website/features/val.html')
-rw-r--r-- | website/features/val.html | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/website/features/val.html b/website/features/val.html index a3ce58e0..4e05f8ca 100644 --- a/website/features/val.html +++ b/website/features/val.html @@ -19,6 +19,10 @@ the type will be inferred from the initializer expression. The local variable will also be made final. This feature works on local variables and on foreach loops only, not on fields. The initializer expression is required. </p><p> + <code>val</code> is actually a 'type' of sorts, and exists as a real class in the <code>lombok</code> package. You must import it for val to work (or use <code>lombok.val</code> as the type). + The existence of this type on a local variable declaration triggers both the adding of the <code>final</code> keyword as well as copying the type of the initializing expression which overwrites + the 'fake' <code>val</code> type. + </p><p> <em>WARNING: This feature does not currently work in NetBeans. We're working on fixing that.</em> </p> </div> |