aboutsummaryrefslogtreecommitdiff
path: root/website2/templates/features/experimental/UtilityClass.html
diff options
context:
space:
mode:
authorReinier Zwitserloot <reinier@zwitserloot.com>2016-10-17 23:09:21 +0200
committerReinier Zwitserloot <reinier@zwitserloot.com>2017-05-29 21:01:53 +0200
commit599b6aab677439ae1bdea2cdca3233d0b763fd3f (patch)
tree8766f124271d056c8e8c22fd1a8a1ada08284275 /website2/templates/features/experimental/UtilityClass.html
parent4e75ed8f8661033662b2d26c4a42fafa9d61b75f (diff)
downloadlombok-599b6aab677439ae1bdea2cdca3233d0b763fd3f.tar.gz
lombok-599b6aab677439ae1bdea2cdca3233d0b763fd3f.tar.bz2
lombok-599b6aab677439ae1bdea2cdca3233d0b763fd3f.zip
Updated just about all of the pages to the template-based redesign.
Added ajaxified loading for feature pages.
Diffstat (limited to 'website2/templates/features/experimental/UtilityClass.html')
-rw-r--r--website2/templates/features/experimental/UtilityClass.html42
1 files changed, 42 insertions, 0 deletions
diff --git a/website2/templates/features/experimental/UtilityClass.html b/website2/templates/features/experimental/UtilityClass.html
new file mode 100644
index 00000000..8145437a
--- /dev/null
+++ b/website2/templates/features/experimental/UtilityClass.html
@@ -0,0 +1,42 @@
+<#import "../_features.html" as f>
+
+<@f.scaffold title="@UtilityClass" logline="Utility, metility, wetility! Utility classes for the masses.">
+ <@f.history>
+ <p>
+ <code>@UtilityClass</code> was introduced as an experimental feature in lombok v1.16.2.
+ </p>
+ </@f.history>
+
+ <@f.experimental>
+ <ul>
+ <li>Some debate as to whether its common enough to count as boilerplate.</li>
+ </ul>
+ Current status: <em>positive</em> - Currently we feel this feature may move out of experimental status with no or minor changes soon.
+ </@f.experimental>
+
+ <@f.overview>
+ <p>
+ A utility class is a class that is just a namespace for functions. No instances of it can exist, and all its members are static. For example, <code>java.lang.Math</code> and <code>java.util.Collections</code> are well known utility classes. This annotation automatically turns the annotated class into one.
+ </p><p>
+ A utility class cannot be instantiated. By marking your class with <code>@UtilityClass</code>, lombok will automatically generate a private constructor that throws an exception, flags as error any explicit constructors you add, and marks the class <code>final</code>. If the class is an inner class, the class is also marked <code>static</code>.
+ </p><p>
+ <em>All</em> members of a utility class are automatically marked as <code>static</code>. Even fields and inner classes.
+ </p>
+ </@f.overview>
+
+ <@f.snippets name="experimental/UtilityClass" />
+
+ <@f.confKeys>
+ <dt>
+ <code>lombok.utilityClass.flagUsage</code> = [<code>warning</code> | <code>error</code>] (default: not set)
+ </dt><dd>
+ Lombok will flag any usage of <code>@UtilityClass</code> as a warning or error if configured.
+ </dd>
+ </@f.confKeys>
+
+ <@f.smallPrint>
+ <p>
+ There isn't currently any way to create non-static members, or to define your own constructor. If you want to instantiate the utility class, even only as an internal implementation detail, <code>@UtilityClass</code> cannot be used.
+ </p>
+ </@f.smallPrint>
+</@f.scaffold>