mirror of
https://github.com/tiennm99/lombok.git
synced 2026-09-10 02:17:34 +00:00
Finish documentation on var
This commit is contained in:
@@ -3,6 +3,7 @@ Lombok Changelog
|
||||
|
||||
### v1.16.11 "Edgy Guinea Pig"
|
||||
* v1.16.10 is the latest release
|
||||
* FEATURE: `var` is the mutable sister of `val`. For now experimental, and opt-in using `ALLOW` in the flagUsage configuration key. Thanks for the contribution, Bulgakov Alexander.
|
||||
* BUGFIX: Annotation Processors that use ecj internally (dagger) no longer give linkage errors [Issue #1218](https://github.com/rzwitserloot/lombok/issues/1218)
|
||||
* BUGFIX: `val` in lambda expressions now work as expected [Issue #911](https://github.com/rzwitserloot/lombok/issues/911)
|
||||
* PLATFORM: Red Hat JBoss Developer Studio is now correctly identified by the installer [Issue #1164](https://github.com/rzwitserloot/lombok/issues/1164)
|
||||
|
||||
@@ -3,14 +3,14 @@ import lombok.var;
|
||||
|
||||
public class ValExample {
|
||||
public String example() {
|
||||
ArrayList example = new ArrayList<String>();
|
||||
ArrayList<String> example = new ArrayList<String>();
|
||||
example.add("Hello, World!");
|
||||
final String foo = example.get(0);
|
||||
return foo.toLowerCase();
|
||||
}
|
||||
|
||||
public void example2() {
|
||||
ArrayList list = new ArrayList<String>();
|
||||
ArrayList<String> list = new ArrayList<String>();
|
||||
list.add("zero");
|
||||
list.add("one");
|
||||
list.add("two");
|
||||
|
||||
@@ -97,7 +97,7 @@
|
||||
</div>
|
||||
</div>
|
||||
<div class="footer">
|
||||
<a href="index.html">Back to experimental features</a> | <span class="disabled">Previous feature</span> | <a href="ExtensionMethod.html">Next feature (@ExtensionMethod)</a><br />
|
||||
<a href="index.html">Back to experimental features</a> | <a href="var.html">Previous feature (var)</a> | <a href="ExtensionMethod.html">Next feature (@ExtensionMethod)</a><br />
|
||||
<a href="../../credits.html" class="creditsLink">credits</a> | <span class="copyright">Copyright © 2009-2016 The Project Lombok Authors, licensed under the <a href="http://www.opensource.org/licenses/mit-license.php">MIT license</a>.</span>
|
||||
</div>
|
||||
<div style="clear: both;"></div>
|
||||
|
||||
@@ -15,7 +15,7 @@
|
||||
<div class="since">
|
||||
<h3>Since</h3>
|
||||
<p>
|
||||
@var was introduced as experimental feature in lombok v1.16.11.
|
||||
@var was introduced as experimental feature in lombok v1.16.12.
|
||||
</p>
|
||||
</div>
|
||||
<div class="experimental">
|
||||
@@ -49,7 +49,7 @@
|
||||
<h3>Supported configuration keys:</h3>
|
||||
<dl>
|
||||
<dt><code>lombok.val.flagUsage</code> = [<code>allow</code>] (default: not set)</dt>
|
||||
<dd>Lombok will flag any usage of <code>var</code> as a error if not configured.</dd>
|
||||
<dd><strong>Lombok will flag any usage of <code>var</code> as an error if not configured.</strong></dd>
|
||||
</dl>
|
||||
</div>
|
||||
<div class="overview">
|
||||
@@ -59,12 +59,12 @@
|
||||
is an expression with a compound type: The result is both <code>AbstractCollection</code> as well as <code>Serializable</code>. The type inferred will be
|
||||
<code>AbstractCollection</code>, as that is a class, whereas <code>Serializable</code> is an interface.
|
||||
</p><p>
|
||||
In ambiguous cases, such as when the initializer expression is <code>null</code>, <code>java.lang.Object</code> is inferred.
|
||||
In ambiguous cases, <code>java.lang.Object</code> is inferred.
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="footer">
|
||||
<a href="index.html">Back to experimental features</a> | <span class="disabled">Previous feature</span> | <a href="ExtensionMethod.html">Next feature (@ExtensionMethod)</a><br />
|
||||
<a href="index.html">Back to experimental features</a> | <span class="disabled">Previous feature</span> | <a href="Accessors.html">Next feature (@Accessors)</a><br />
|
||||
<a href="../../credits.html" class="creditsLink">credits</a> | <span class="copyright">Copyright © 2009-2016 The Project Lombok Authors, licensed under the <a href="http://www.opensource.org/licenses/mit-license.php">MIT license</a>.</span>
|
||||
</div>
|
||||
<div style="clear: both;"></div>
|
||||
|
||||
Reference in New Issue
Block a user