aboutsummaryrefslogtreecommitdiff
path: root/website
diff options
context:
space:
mode:
Diffstat (limited to 'website')
-rw-r--r--website/features/experimental/index.html2
-rw-r--r--website/features/experimental/var.html83
2 files changed, 85 insertions, 0 deletions
diff --git a/website/features/experimental/index.html b/website/features/experimental/index.html
index f3893674..4a6d12bb 100644
--- a/website/features/experimental/index.html
+++ b/website/features/experimental/index.html
@@ -22,6 +22,8 @@
Features that receive positive community feedback and which seem to produce clean, flexible code will eventually become accepted
as a core feature and move out of the experimental package.
<dl>
+ <dt><a href="var.html"><code>@var</code></a></dt>
+ <dd>The same as @val but modifiable.</dd>
<dt><a href="Accessors.html"><code>@Accessors</code></a></dt>
<dd>A more fluent API for getters and setters.</dd>
<dt><a href="ExtensionMethod.html"><code>@ExtensionMethod</code></a></dt>
diff --git a/website/features/experimental/var.html b/website/features/experimental/var.html
new file mode 100644
index 00000000..7a045c00
--- /dev/null
+++ b/website/features/experimental/var.html
@@ -0,0 +1,83 @@
+<!DOCTYPE html>
+<html><head>
+ <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
+ <link rel="stylesheet" type="text/css" href="../../logi/reset.css" />
+ <link rel="stylesheet" type="text/css" href="../features.css" />
+ <link rel="shortcut icon" href="../../favicon.ico" type="image/x-icon" />
+ <meta name="description" content="Spice up your java" />
+ <title>EXPERIMENTAL – @var</title>
+</head><body><div id="pepper">
+ <div class="minimumHeight"></div>
+ <div class="meat">
+ <div class="header"><a href="../../index.html">Project Lombok</a></div>
+ <h1>@var</h1>
+ <div class="byline">Modifiable local variables with a type inferred by assigning value.</div>
+ <div class="since">
+ <h3>Since</h3>
+ <p>
+ @var was introduced as experimental feature in lombok v1.16.11.
+ </p>
+ </div>
+ <div class="experimental">
+ <h3>Experimental</h3>
+ <p>
+ Experimental because:
+ <ul>
+ <li>This feature is very controversial.</li>
+ <li>There is <a href="http://openjdk.java.net/jeps/286">JEP 286</a> that should make the @var obsolete.</li>
+ </ul>Current status: <em>uncertain</em> - Currently we feel this feature cannot move out of experimental status.
+ </div>
+ <div class="overview">
+ <h3>Overview</h3>
+ <p>
+ The <code>@var</code> has the same mission as the <a href="../val.html">@val</a> annotation but modifable.
+ </p>
+ </div>
+ <div class="snippets">
+ <div class="pre">
+ <h3>With Lombok</h3>
+ <div class="snippet">@HTML_PRE@</div>
+ </div>
+ <div class="sep"></div>
+ <div class="post">
+ <h3>Vanilla Java</h3>
+ <div class="snippet">@HTML_POST@</div>
+ </div>
+ </div>
+ <div style="clear: left;"></div>
+ <div class="overview confKeys">
+ <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>
+ </dl>
+ </div>
+ <div class="overview">
+ <h3>Small print</h3><div class="smallprint">
+ <p>
+ For compound types, the most common superclass is inferred, not any shared interfaces. For example, <code>bool ? new HashSet() : new ArrayList()</code>
+ 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.
+ </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="../../credits.html" class="creditsLink">credits</a> | <span class="copyright">Copyright &copy; 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>
+ </div>
+</div>
+<script type="text/javascript">
+ var gaJsHost = (("https:" == document.location.protocol) ? "https://ssl." : "http://www.");
+ document.write(unescape("%3Cscript src='" + gaJsHost + "google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E"));
+</script>
+<script type="text/javascript">
+ try {
+ var pageTracker = _gat._getTracker("UA-9884254-1");
+ pageTracker._trackPageview();
+ } catch(err) {}
+</script>
+</body></html>