aboutsummaryrefslogtreecommitdiff
path: root/website
diff options
context:
space:
mode:
Diffstat (limited to 'website')
-rw-r--r--website/templates/features/experimental/StandardException.html36
-rw-r--r--website/templates/features/experimental/index.html4
-rw-r--r--website/usageExamples/StandardExceptionExample_post.jpage16
-rw-r--r--website/usageExamples/StandardExceptionExample_pre.jpage5
4 files changed, 61 insertions, 0 deletions
diff --git a/website/templates/features/experimental/StandardException.html b/website/templates/features/experimental/StandardException.html
new file mode 100644
index 00000000..25324c4b
--- /dev/null
+++ b/website/templates/features/experimental/StandardException.html
@@ -0,0 +1,36 @@
+<#import "../_features.html" as f>
+
+<@f.scaffold title="@StandardException"
+ logline="TODO">
+ <@f.history>
+ <p>
+ <code>@StandardException</code> was introduced as an experimental feature in lombok v1.18.21.
+ </p>
+ </@f.history>
+
+ <@f.overview>
+ <p>
+ This annotation is intended to be used on subclasses of <code>java.util.Throwable</code>. For each of the four constructors in <code>Throwable</code>, it will generate a corresponding constructor in the target class, that simply forwards its argument to its super-counterpart.
+ </p><p>
+ If any of those constructors is manually overriden, it is simply skipped. This allows applying special treatment such as annotations.
+ </p>
+ </@f.overview>
+
+ <@f.snippets name="StandardException" />
+
+ <@f.confKeys>
+ <dt>
+ <code>lombok.standardException.addConstructorProperties</code> = [<code>true</code> | <code>false</code>] (default: <code>false</code>)
+ </dt><dt>
+ <code>lombok.standardException.flagUsage</code> = [<code>warning</code> | <code>error</code>] (default: not set)
+ </dt><dd>
+ Lombok will flag any usage of <code>@StandardException</code> as a warning or error if configured.
+ </dd>
+ </@f.confKeys>
+
+ <@f.smallPrint>
+ <p>
+ Although such situation is unlikely to occur, this annotation can technically be applied to any class for which all four expected constructors are defined in a superclass.
+ </p>
+ </@f.smallPrint>
+</@f.scaffold>
diff --git a/website/templates/features/experimental/index.html b/website/templates/features/experimental/index.html
index 32590815..34dd3bb4 100644
--- a/website/templates/features/experimental/index.html
+++ b/website/templates/features/experimental/index.html
@@ -75,6 +75,10 @@
<@main.feature title="@Jacksonized" href="Jacksonized">
Bob, meet Jackson. Lets make sure you become fast friends.
</@main.feature>
+
+ <@main.feature title="@StandardException" href="StandardException">
+ TODO
+ </@main.feature>
</div>
<@f.confKeys>
diff --git a/website/usageExamples/StandardExceptionExample_post.jpage b/website/usageExamples/StandardExceptionExample_post.jpage
new file mode 100644
index 00000000..148603a9
--- /dev/null
+++ b/website/usageExamples/StandardExceptionExample_post.jpage
@@ -0,0 +1,16 @@
+public class ExampleException extends Exception {
+ public ExampleException() {
+ }
+
+ public ExampleException(String message) {
+ super(message);
+ }
+
+ public ExampleException(Throwable cause) {
+ super(cause);
+ }
+
+ public ExampleException(String message, Throwable cause) {
+ super(message, cause);
+ }
+} \ No newline at end of file
diff --git a/website/usageExamples/StandardExceptionExample_pre.jpage b/website/usageExamples/StandardExceptionExample_pre.jpage
new file mode 100644
index 00000000..8d85286c
--- /dev/null
+++ b/website/usageExamples/StandardExceptionExample_pre.jpage
@@ -0,0 +1,5 @@
+import lombok.experimental.StandardException;
+
+@StandardException
+public class ExampleException extends Exception {
+} \ No newline at end of file