diff options
Diffstat (limited to 'website-old/features/experimental')
-rw-r--r-- | website-old/features/experimental/Accessors.html | 116 | ||||
-rw-r--r-- | website-old/features/experimental/Builder.html | 36 | ||||
-rw-r--r-- | website-old/features/experimental/Delegate.html | 100 | ||||
-rw-r--r-- | website-old/features/experimental/ExtensionMethod.html | 116 | ||||
-rw-r--r-- | website-old/features/experimental/FieldDefaults.html | 95 | ||||
-rw-r--r-- | website-old/features/experimental/Value.html | 36 | ||||
-rw-r--r-- | website-old/features/experimental/Wither.html | 113 | ||||
-rw-r--r-- | website-old/features/experimental/index.html | 77 | ||||
-rw-r--r-- | website-old/features/experimental/onX.html | 92 | ||||
-rw-r--r-- | website-old/features/experimental/var.html | 83 |
10 files changed, 0 insertions, 864 deletions
diff --git a/website-old/features/experimental/Accessors.html b/website-old/features/experimental/Accessors.html deleted file mode 100644 index 909c0873..00000000 --- a/website-old/features/experimental/Accessors.html +++ /dev/null @@ -1,116 +0,0 @@ -<!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 – @Accessors</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>@Accessors</h1> - <div class="byline">A more fluent API for getters and setters.</div> - <div class="since"> - <h3>Since</h3> - <p> - @Accessors was introduced as experimental feature in lombok v0.11.0. - </p> - </div> - <div class="experimental"> - <h3>Experimental</h3> - <p> - Experimental because: - <ul> - <li>We may want to roll these features into a more complete property support concept.</li> - <li>New feature - community feedback requested.</li> - </ul> - Current status: <em>positive</em> - Currently we feel this feature may move out of experimental status with no or minor changes soon. - </div> - <div class="overview"> - <h3>Overview</h3> - <p> - The <code>@Accessors</code> annotation is used to configure how lombok generates and looks for getters and setters. - </p><p> - By default, lombok follows the <em>bean specification</em> for getters and setters: The getter for a field named <code>pepper</code> - is <code>getPepper</code> for example. However, some might like to break with the <em>bean specification</em> in order to end up with - nicer looking APIs. <code>@Accessors</code> lets you do this. - </p><p> - Some programmers like to use a prefix for their fields, i.e. they write <code>fPepper</code> instead of <code>pepper</code>. - We <em>strongly</em> discourage doing this, as you can't unit test the validity of your prefixes, and refactor scripts may turn fields - into local variables or method names. Furthermore, your tools (such as your editor) can take care of rendering the identifier in a - certain way if you want this information to be instantly visible. Nevertheless, you can list the prefixes that your project uses via - <code>@Accessors</code> as well. - </p><p> - <code>@Accessors</code> therefore has 3 options:<ul> - <li><code>fluent</code> - A boolean. If <em>true</em>, the getter for <code>pepper</code> is just <code>pepper()</code>, and the - setter is <code>pepper(T newValue)</code>. Furthermore, unless specified, <code>chain</code> defaults to <em>true</em>.<br /> - Default: <em>false</em>.</li> - <li><code>chain</code> - A boolean. If <em>true</em>, generated setters return <code>this</code> instead of <code>void</code>.<br /> - Default: <em>false</em>, unless <code>fluent=true</code>, then Default: <em>true</em>.</li> - <li><code>prefix</code> - A list of strings. If present, fields must be prefixed with any of these prefixes. Each field name is - compared to each prefix in the list in turn, and if a match is found, the prefix is stripped out to create the base name for - the field. It is legal to include an empty string in the list, which will always match. For characters which are letters, the - character following the prefix must not be a lowercase letter, i.e. <code>pepper</code> is not a match even to prefix <code>p</code>, - but <code>pEpper</code> would be (and would mean the base name of this field is <code>epper</code>).</li> - </p><p> - The <code>@Accessors</code> annotation is legal on types and fields; the annotation that applies is the one on the field if present, - otherwise the one on the class. When a <code>@Accessors</code> annotation on a field is present, any <code>@Accessors</code> annotation - also present on that field's type is ignored. - </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.accessors.chain</code> = [<code>true</code> | <code>false</code>] (default: false)</dt> - <dd>If set to <code>true</code>, any class that either doesn't have an <code>@Accessors</code> annotation, or it does, but that annotation does not have an explicit value for the <code>chain</code> parameter, will act as if <code>@Accessors(chain = true)</code> is present.</dd> - <dt><code>lombok.accessors.fluent</code> = [<code>true</code> | <code>false</code>] (default: false)</dt> - <dd>If set to <code>true</code>, any class that either doesn't have an <code>@Accessors</code> annotation, or it does, but that annotation does not have an explicit value for the <code>fluent</code> parameter, will act as if <code>@Accessors(fluent = true)</code> is present.</dd> - <dt><code>lombok.accessors.prefix</code> += <em>a field prefix</em> (default: empty list)</dt> - <dd>This is a list property; entries can be added with the <code>+=</code> operator. Inherited prefixes from parent config files can be removed with the <code>-=</code> operator. Any class that either doesn't have an <code>@Accessors</code> annotation, or it does, but that annotation does not have an explicit value for the <code>prefix</code> parameter, will act as if <code>@Accessors(prefix = {<em>prefixes listed in configuration</em>})</code> is present.</dd> - <dt><code>lombok.accessors.flagUsage</code> = [<code>warning</code> | <code>error</code>] (default: not set)</dt> - <dd>Lombok will flag any usage of <code>@Accessors</code> as a warning or error if configured.</dd> - </dl> - </div> - <div class="overview"> - <h3>Small print</h3><div class="smallprint"> - <p> - The nearest <code>@Accessors</code> annotation is also used for the various methods in lombok that look for getters, such as - <code>@EqualsAndHashCode</code>. - </p><p> - If a prefix list is provided and a field does not start with one of them, that field is skipped entirely by lombok, and - a warning will be generated. - </p> - </div> - </div> - <div class="footer"> - <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> - </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> diff --git a/website-old/features/experimental/Builder.html b/website-old/features/experimental/Builder.html deleted file mode 100644 index e1c545fc..00000000 --- a/website-old/features/experimental/Builder.html +++ /dev/null @@ -1,36 +0,0 @@ -<!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>@Builder</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>@Builder</h1> - <div class="byline">... and Bob's your uncle: No-hassle fancy-pants APIs for object creation!</div> - <div class="moved"> - @Builder has been promoted to the core package in lombok release v1.16.0.<br /> - The documentation has been moved here: <a href="../Builder.html">@lombok.Builder</a>. - </div> - <div class="footer"> - <a href="index.html">Back to experimental features</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> - </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> diff --git a/website-old/features/experimental/Delegate.html b/website-old/features/experimental/Delegate.html deleted file mode 100644 index 5173376d..00000000 --- a/website-old/features/experimental/Delegate.html +++ /dev/null @@ -1,100 +0,0 @@ -<!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 – @Delegate</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>@Delegate</h1> - <div class="byline">Don't lose your composition.</div> - <div class="since"> - <h3>Since</h3> - <p> - @Delegate was introduced as feature in lombok v0.10. It was moved to the experimental package in lombok v1.14; the old version from the main lombok package is now deprecated. - </p> - </div> - <div class="experimental"> - <h3>Experimental</h3> - <p> - Experimental because: - <ul> - <li>Not used that much</li> - <li>Difficult to support for edge cases, such as recursive delegation.</li> - <li>API is rather unfriendly; it would be a lot nicer if you can simply implement some methods and let <code>@Delegate</code> generate delegates for whatever you didn't manually implement, but due to issues with generics erasure this also can't be made to work without caveats. - </ul> - Current status: <em>negative</em> - Currently we feel this feature will not move out of experimental status anytime soon, and support for this feature may be dropped if future versions of javac or ecj make it difficult to continue to maintain the feature. - </div> - <div class="overview"> - <h3>Overview</h3> - <p> - Any field or no-argument method can be annotated with <code>@Delegate</code> to let lombok generate delegate methods that forward the call to this field (or the result of invoking this method). - </p><p> - Lombok delegates all <code>public</code> methods of the field's type (or method's return type), as well as those of its supertypes except for all - methods declared in <code>java.lang.Object</code>. - </p><p> - You can pass any number of classes into the <code>@Delegate</code> annotation's <code>types</code> parameter. - If you do that, then lombok will delegate all <code>public</code> methods in those types (and their supertypes, except <code>java.lang.Object</code>) instead of looking at the field/method's type. - </p><p> - All public non-<code>Object</code> methods that are part of the calculated type(s) are copied, whether or not you also wrote implementations for those methods. That would thus result in duplicate method errors. You can avoid these - by using the <code>@Delegate(excludes=SomeType.class)</code> parameter to exclude all public methods in the excluded type(s), and their supertypes. - </p><p> - To have very precise control over what is delegated and what isn't, write private inner interfaces with method signatures, then specify these - private inner interfaces as types in <code>@Delegate(types=PrivateInnerInterfaceWithIncludesList.class, excludes=SameForExcludes.class)</code>. - </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.delegate.flagUsage</code> = [<code>warning</code> | <code>error</code>] (default: not set)</dt> - <dd>Lombok will flag any usage of <code>@Delegate</code> as a warning or error if configured.</dd> - </dl> - </div> - <div class="overview"> - <h3>Small print</h3><div class="smallprint"> - <p> - When passing classes to the annotation's <code>types</code> or <code>excludes</code> parameter, you cannot include generics. - This is a limitation of java. Use private inner interfaces or classes that extend the intended type including the - generics parameter to work around this problem. - </p><p> - When passing classes to the annotation, these classes do not need to be supertypes of the field. See the example. - </p><p> - <code>@Delegate</code> cannot be used on static fields or methods. - </p><p> - <code>@Delegate</code> cannot be used when the calculated type(s) to delegate / exclude themselves contain <code>@Delegate</code> annotations; in other words, <code>@Delegate</code> will error if you attempt to use it recursively. - </div> - </div> - <div class="footer"> - <a href="index.html">Back to experimental features</a> | <a href="FieldDefaults.html">Previous feature (@FieldDefaults)</a> | <a href="Wither.html">Next feature (@Wither)</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> - </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> diff --git a/website-old/features/experimental/ExtensionMethod.html b/website-old/features/experimental/ExtensionMethod.html deleted file mode 100644 index 7090fd19..00000000 --- a/website-old/features/experimental/ExtensionMethod.html +++ /dev/null @@ -1,116 +0,0 @@ -<!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 – @ExtensionMethod</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>@ExtensionMethod</h1> - <div class="byline">Annoying API? Fix it yourself: Add new methods to existing types!</div> - <div class="since"> - <h3>Since</h3> - <p> - @ExtensionMethod was introduced as experimental feature in lombok v0.11.2. - </p> - </div> - <div class="experimental"> - <h3>Experimental</h3> - <p> - Experimental because: - <ul> - <li>High-impact on code style</li> - <li>Really would like to ship with utility methods to expand common classes, but so far lombok doesn't have a good distribution method for such runtime dependencies</li> - <li>Affects quite a bit of eclipse, and auto-complete e.d. do not work yet in netbeans</li> - <li>Should @ExtensionMethod be legal on methods? Should it be legal on packages?</li> - </ul> - Current status: <em>positive</em> - Currently we feel this feature may move out of experimental status with no or minor changes soon. - </div> - <div class="overview"> - <h3>Overview</h3> - <p> - You can make a class containing a bunch of <code>public</code>, <code>static</code> methods which all take at least 1 - parameter. These methods will extend the type of the first parameter, as if they were instance methods, using the - <code>@ExtensionMethod</code> feature. - </p> - </p><p> - For example, if you create <code>public static String toTitleCase(String in) { ... }</code>, you can use the - <code>@ExtensionMethod</code> feature to make it look like the <code>java.lang.String</code> class has a method named - <code>toTitleCase</code>, which has no arguments. The first argument of the static method fills the role of <code>this</code> - in instance methods. - </p><p> - All methods that are <code>public</code>, <code>static</code>, and have at least 1 argument whose type is not primitive, are - considered extension methods, and each will be injected into the namespace of the type of the first parameter as if they were - instance methods. As in the above example, a call that looks like: <code>foo.toTitleCase()</code> is replaced with - <code>ClassContainingYourExtensionMethod.toTitleCase(foo);</code>. Note that it is actually not an instant - <code>NullPointerException</code> if <code>foo</code> is null - it is passed like any other parameter. - </p><p> - You can pass any number of classes to the <code>@ExtensionMethod</code> annotation; they will all be searched for - extension methods. These extension methods apply for any code that is in the annotated class. - </p><p> - Lombok does not (currently) have any runtime dependencies which means lombok does not (currently) ship with any useful - extension methods so you'll have to make your own. However, here's one that might spark your imagination: - <pre>public class ObjectExtensions { - public static <T> or(T object, T ifNull) { - return object != null ? object : ifNull; - } -}</pre> - With the above class, if you add <code>@ExtensionMethod(ObjectExtensions.class)</code> to your class definition, you can write: - <pre>String x = null; -System.out.println(x.or("Hello, World!"));</pre> - The above code will not fail with a <code>NullPointerException</code>; it will actually output <code>Hello, World!</code> - </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.extensionMethod.flagUsage</code> = [<code>warning</code> | <code>error</code>] (default: not set)</dt> - <dd>Lombok will flag any usage of <code>@ExtensionMethod</code> as a warning or error if configured.</dd> - </dl> - </div> - <div class="overview"> - <h3>Small print</h3><div class="smallprint"> - <p> - Calls are rewritten to a call to the extension method; the static method itself is not inlined. Therefore, the - extension method must be present both at compile and at runtime. - </p><p> - Generics is fully applied to figure out extension methods. i.e. if the first parameter of your extension method is - <code>List<? extends String></code>, then any expression that is compatible with that will have your extension method, - but other kinds of lists won't. So, a <code>List<Object></code> won't get it, but a <code>List<String></code> will. - </p> - </div> - </div> - <div class="footer"> - <a href="index.html">Back to experimental features</a> | <a href="Accessors.html">Previous feature (@Accessors)</a> | <a href="FieldDefaults.html">Next feature (@FieldDefaults)</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> - </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> diff --git a/website-old/features/experimental/FieldDefaults.html b/website-old/features/experimental/FieldDefaults.html deleted file mode 100644 index a253198b..00000000 --- a/website-old/features/experimental/FieldDefaults.html +++ /dev/null @@ -1,95 +0,0 @@ -<!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 – @FieldDefaults</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>@FieldDefaults</h1> - <div class="byline">New default field modifiers for the 21st century.</div> - <div class="since"> - <h3>Since</h3> - <p> - @FieldDefaults was introduced as experimental feature in lombok v0.11.4. - </p> - </div> - <div class="experimental"> - <h3>Experimental</h3> - <p> - Experimental because: - <ul> - <li>New feature; unsure if this busts enough boilerplate</li> - <li>Would be nice if you could stick this on the package-info.java package to set the default for all classes in that package</li> - <li>Part of the work on @Value, which is experimental</li> - </ul> - Current status: <em>positive</em> - Currently we feel this feature may move out of experimental status with no or minor changes soon. - </div> - <div class="overview"> - <h3>Overview</h3> - <p> - The <code>@FieldDefaults</code> annotation can add an access modifier (<code>public</code>, <code>private</code>, or <code>protected</code>) - to each field in the annotated class or enum. It can also add <code>final</code> to each field in the annotated class or enum. - </p> - </p><p> - To add <code>final</code> to each (instance) field, use <code>@FieldDefaults(makeFinal=true)</code>. Any non-final field which must remain nonfinal - can be annotated with <code>@NonFinal</code> (also in the <code>lombok.experimental</code> package). - </p><p> - To add an access modifier to each (instance) field, use <code>@FieldDefaults(level=AccessLevel.PRIVATE)</code>. Any field that does not already have an - access modifier (i.e. any field that looks like package private access) is changed to have the appropriate access modifier. Any package private - field which must remain package private can be annotated with <code>@PackagePrivate</code> (also in the <code>lombok.experimental</code> package). - </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.fieldDefaults.flagUsage</code> = [<code>warning</code> | <code>error</code>] (default: not set)</dt> - <dd>Lombok will flag any usage of <code>@FieldDefaults</code> as a warning or error if configured.</dd> - <dt><code>lombok.fieldDefaults.defaultPrivate</code> = [<code>true</code> | <code>false</code>] (default: false)</dt> - <dd>(Since 1.16.8) If set to <code>true</code>, <em>every</em> field in <em>every</em> class or enum anywhere in the sources being compiled will be marked as <code>private</code> unless it has an explicit access modifier or the <code>@PackagePrivate</code> annotation, or an explicit <code>@FieldDefaults</code> annotation is present to override this config key.</dd> - <dt><code>lombok.fieldDefaults.defaultFinal</code> = [<code>true</code> | <code>false</code>] (default: false)</dt> - <dd>(Since 1.16.8) If set to <code>true</code>, <em>every</em> field in <em>every</em> class or enum anywhere in the sources being compiled will be marked as <code>final</code> unless it has the <code>@NonFinal</code> annotation, or an explicit <code>@FieldDefaults</code> annotation is present to override this config key.</dd> - </dl> - </div> - <div class="overview"> - <h3>Small print</h3><div class="smallprint"> - <p> - Like other lombok handlers that touch fields, any field whose name starts with a dollar (<code>$</code>) symbol is skipped entirely. - Such a field will not be modified at all. - </p> - </div> - </div> - <div class="footer"> - <a href="index.html">Back to experimental features</a> | <a href="ExtensionMethod.html">Previous feature (@ExtensionMethod)</a> | <a href="Delegate.html">Next feature (@Delegate)</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> - </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> diff --git a/website-old/features/experimental/Value.html b/website-old/features/experimental/Value.html deleted file mode 100644 index ec0ff9e4..00000000 --- a/website-old/features/experimental/Value.html +++ /dev/null @@ -1,36 +0,0 @@ -<!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 – @Value</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>@Value</h1> - <div class="byline">Immutable classes made very easy.</div> - <div class="moved"> - @Value has been promoted to the core package in lombok release v1.12.0.<br /> - The documentation has been moved here: <a href="../Value.html">@lombok.Value</a>. - </div> - <div class="footer"> - <a href="index.html">Back to experimental features</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> - </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> diff --git a/website-old/features/experimental/Wither.html b/website-old/features/experimental/Wither.html deleted file mode 100644 index c8030bd9..00000000 --- a/website-old/features/experimental/Wither.html +++ /dev/null @@ -1,113 +0,0 @@ -<!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 – @Wither</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>@Wither</h1> - <div class="byline">Immutable 'setters' - methods that create a clone but with one changed field.</div> - <div class="since"> - <h3>Since</h3> - <p> - @Wither was introduced as experimental feature in lombok v0.11.4. - </p> - </div> - <div class="experimental"> - <h3>Experimental</h3> - <p> - Experimental because: - <ul> - <li>Still not sure that <code>@Wither</code> is an appropriate name for this feature.</li> - <li>Should there be an option to supply a way of cloning the input somehow?</li> - <li>Should the way that the clone is created by configurable?</li> - <li>Should we replace @Wither entirely with a builder class?</li> - </ul> - Current status: <em>neutral</em> - More feedback requires on the items in the above list before promotion to the main package is warranted. - </div> - <div class="overview"> - <h3>Overview</h3> - <p> - The next best alternative to a setter for an immutable property is to construct a clone of the object, but with a new value for this one field. - A method to generate this clone is precisely what <code>@Wither</code> generates: a <code>withFieldName(newValue)</code> method which produces a clone - except for the new value for the associated field. - </p><p> - For example, if you create <code>public class Point { private final int x, y; }</code>, setters make no sense because the fields - are final. <code>@Wither</code> can generate a <code>withX(int newXValue)</code> method for you which will return a new point with the supplied - value for <code>x</code> and the same value for <code>y</code>. - </p><p> - Like <a href="../GetterSetter.html"><code>@Setter</code></a>, you can specify an access level in case you want the generated wither to be something other than <code>public</code>:<br /> - <code>@Wither(level = AccessLevel.PROTECTED)</code>. Also like <a href="../GetterSetter.html"><code>@Setter</code></a>, you can also put a <code>@Wither</code> annotation on a type, which means - a 'wither' is generated for each field (even non-final fields). - </p><p> - To put annotations on the generated method, you can use <code>onMethod=@__({@AnnotationsHere})</code>; to put annotations on the only parameter of a generated wither method, you can use <code>onParam=@__({@AnnotationsHere})</code>. Be careful though! This is an experimental feature. For more details see the documentation on the <a href="onX.html">onX</a> feature. - </p><p> - <em>NEW in lombok v1.12.0:</em> javadoc on the field will now be copied to generated withers. Normally, all text is copied, and <code>@param</code> is <em>moved</em> to the wither, whilst <code>@return</code> lines are stripped from the wither's javadoc. Moved means: Deleted from the field's javadoc. It is also possible to define unique text for the wither's javadoc. To do that, you create a 'section' named <code>WITHER</code>. A section is a line in your javadoc containing 2 or more dashes, then the text 'WITHER', followed by 2 or more dashes, and nothing else on the line. If you use sections, <code>@return</code> and <code>@param</code> stripping / copying for that section is no longer done (move the <code>@param</code> line into the section). - </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.wither.flagUsage</code> = [<code>warning</code> | <code>error</code>] (default: not set)</dt> - <dd>Lombok will flag any usage of <code>@Wither</code> as a warning or error if configured.</dd> - </dl> - </div> - <div class="overview"> - <h3>Small print</h3><div class="smallprint"> - <p> - Withers cannot be generated for static fields because that makes no sense. - </p><p> - Withers can be generated for abstract classes, but this generates an abstract method with the appropriate signature. - </p><p> - When applying <code>@Wither</code> to a type, static fields and fields whose name start with a $ are skipped. - </p><p> - For generating the method names, the first character of the field, if it is a lowercase character, is title-cased, otherwise, it is left unmodified. - Then, <code>with</code> is prefixed. - </p><p> - No method is generated if any method already exists with the same name (case insensitive) and same parameter count. For example, <code>withX(int x)</code> - will not be generated if there's already a method <code>withX(String... x)</code> even though it is technically possible to make the method. This caveat - exists to prevent confusion. If the generation of a method is skipped for this reason, a warning is emitted instead. Varargs count as 0 to N parameters. - </p><p> - For <code>boolean</code> fields that start with <code>is</code> immediately followed by a title-case letter, nothing is prefixed to generate the wither name. - </p><p> - Any annotations named <code>@NonNull</code> (case insensitive) on the field are interpreted as: This field must not ever hold - <em>null</em>. Therefore, these annotations result in an explicit null check in the generated wither. Also, these - annotations (as well as any annotation named <code>@Nullable</code> or <code>@CheckForNull</code>) are copied to wither parameter. - </p> - </div> - </div> - <div class="footer"> - <a href="index.html">Back to experimental features</a> | <a href="Delegate.html">Previous feature (@Delegate)</a> | <a href="onX.html">Next feature (onX)</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> - </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> diff --git a/website-old/features/experimental/index.html b/website-old/features/experimental/index.html deleted file mode 100644 index 4a6d12bb..00000000 --- a/website-old/features/experimental/index.html +++ /dev/null @@ -1,77 +0,0 @@ -<!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>Lombok feature overview</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>Lombok experimental features</h1> - <div class="index overview"> - Experimental features are available in your normal lombok installation, but are not as robustly supported as lombok's main features. - In particular, experimental features:<ul> - <li>Are not tested as well as the core features.</li> - <li>Do not get bugs fixed as quickly as core features.</li> - <li>May have APIs that will change, possibly drastically if we find a different, better way to solve the same problem.</li> - <li>May disappear entirely if the feature is too difficult to support or does bust enough boilerplate.</li> - </ul> - 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> - <dd>Annoying API? Fix it yourself: Add new methods to existing types!</dd> - <dt><a href="FieldDefaults.html"><code>@FieldDefaults</code></a></dt> - <dd>New default field modifiers for the 21st century.</dd> - <dt><a href="Delegate.html"><code>@Delegate</code></a></dt> - <dd>Don't lose your composition.</dd> - <dt><a href="Wither.html"><code>@Wither</code></a></dt> - <dd>Immutable 'setters' - methods that create a clone but with one changed field.</dd> - <dt><a href="onX.html"><code>onMethod= / onConstructor= / onParam=</code></a></dt> - <dd>Sup dawg, we heard you like annotations, so we put annotations in your annotations so you can annotate while you're annotating.</dd> - <dt><a href="UtilityClass.html"><code>@UtilityClass</code></a></dt> - <dd>Utility, metility, wetility! Utility classes for the masses.</dd> - <dt><a href="Helper.html"><code>@Helper</code></a></dt> - <dd>With a little help from my friends... Helper methods for java.</dd> - </dl> - </div> - <div class="overview confKeys"> - <h3>Supported configuration keys:</h3> - <dl> - <dt><code>lombok.experimental.flagUsage</code> = [<code>warning</code> | <code>error</code>] (default: not set)</dt> - <dd>Lombok will flag any usage of any of the features listed here as a warning or error if configured.</dd> - </dl> - </div> - <div class="index overview"> - <h3>Putting the "Ex" in "Experimental": promoted or deleted experimental features.</h3> - <dl> - <dt><a href="../Value.html"><code>@Value</code></a>: Promoted</dt> - <dd><code>@Value</code> has proven its value and has been moved to the main package.</li> - <dt><a href="../Builder.html"><code>@Builder</code></a>: Promoted</dt> - <dd><code>@Builder</code> is a solid base to build APIs on, and has been moved to the main package.</li> - </dl> - </div> - <div class="footer"> - <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> - </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> diff --git a/website-old/features/experimental/onX.html b/website-old/features/experimental/onX.html deleted file mode 100644 index 39faa1bf..00000000 --- a/website-old/features/experimental/onX.html +++ /dev/null @@ -1,92 +0,0 @@ -<!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 – onX</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>onX</h1> - <div class="byline">Sup dawg, we heard you like annotations, so we put annotations in your annotations so you can annotate while you're annotating.</div> - <div class="since"> - <h3>Since</h3> - <p> - onX was introduced as experimental feature in lombok v0.11.8. - </p> - </div> - <div class="experimental"> - <h3>Experimental</h3> - <p> - Experimental because: - <ul> - <li>Ugly syntax. The syntax of this feature is not optimal, but it is the least convoluted syntax that could possibly work (for now!)</li> - <li>Possibly java 9 will offer (much) better ways of supporting this feature.</li> - <li>Uncertainty: Future versions of javac may break this feature, and we may not be able to restore it.</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> - <strong>This feature is considered 'workaround status' - it exists in order to allow users of lombok that cannot work without this feature to have access to it anyway. If we find a better way to implement this feature, or some future java version introduces an alternative strategy, this feature can disappear without a reasonable deprecation period. Also, this feature may not work in future versions of javac. Use at your own discretion.</strong> - </p><p> - Most annotations that make lombok generate methods or constructors can be configured to also make lombok put custom annotations on elements in the generated code. - </p><p> - <code>@Getter</code>, <code>@Setter</code>, and <code>@Wither</code> support the <code>onMethod</code> option, which will put the listed annotations on the generated method. - </p><p> - <code>@AllArgsConstructor</code>, <code>@NoArgsConstructor</code>, and <code>@RequiredArgsConstructor</code> support the <code>onConstructor</code> option which will put the listed annotations on the generated constructor. - </p><p> - <code>@Setter</code> and <code>@Wither</code> support <code>onParam</code> in addition to <code>onMethod</code>; annotations listed will be put on the only parameter that the generated method has. <code>@EqualsAndHashCode</code> also supports <code>onParam</code>; the listed annotation(s) will be placed on the single parameter of the generated <code>equals</code> method, as well as any generated <code>canEqual</code> method. - </p><p> - The syntax is a little strange and depends on the javac you are using.<br /> - On javac7, to use any of the 3 <code>onX</code> features, you must wrap the annotations to be applied to the constructor / method / parameter in <code>@__(@AnnotationGoesHere)</code>. To apply multiple annotations, use <code>@__({@Annotation1, @Annotation2})</code>. The annotations can themselves obviously have parameters as well.<br /> - On javac8 and up, you add an underscore after <code>onMethod</code>, <code>onParam</code>, or <code>onConstructor</code>. - </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"> - <h3>Small print</h3><div class="smallprint"> - <p> - The reason of the weird syntax is to make this feature work in javac 7 compilers; the <code>@__</code> type is an annotation reference to the annotation type <code>__</code> (double underscore) which doesn't actually exist; this makes javac 7 delay aborting the compilation process due to an error because it is possible an annotation processor will later create the <code>__</code> type. Instead, lombok applies the annotations and removes the references so that the error will never actually occur. The point is: The <code>__</code> type <em>must not exist</em>, otherwise the feature does not work. In the rare case that the <code>__</code> type does exist (and is imported or in the package), you can simply add more underscores. Technically any non-existent type would work, but to maintain consistency and readability and catch erroneous use, lombok considers it an error if the 'wrapper' annotation is anything but a series of underscores. - </p><p> - In javac8, the above feature should work but due to a bug in javac8 it does not. However, starting in javac8, if the parameter name does not exist in the annotation type, compilation proceeds to a phase where lombok can fix it. - </p><p> - To reiterate: This feature can disappear at any time; if you use this feature, be prepared to adjust your code when we find a nicer way of implementing this feature, or, if a future version of javac forces us to remove this feature entirely with no alternative. - </p><p> - The <code>onX</code> parameter is not legal on any type-wide variant. For example, a <code>@Getter</code> annotation on a class does not support <code>onMethod</code>. - </p> - </div> - </div> - <div class="footer"> - <a href="index.html">Back to experimental features</a> | <a href="Wither.html">Previous feature (@Wither)</a> | <a href="UtilityClass.html">Next feature (@UtilityClass)</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> - </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> diff --git a/website-old/features/experimental/var.html b/website-old/features/experimental/var.html deleted file mode 100644 index dde9c35e..00000000 --- a/website-old/features/experimental/var.html +++ /dev/null @@ -1,83 +0,0 @@ -<!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.12. - </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><strong>Lombok will flag any usage of <code>var</code> as an error if not configured.</strong></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, <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="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> - </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> |