diff options
Diffstat (limited to 'website/features')
-rw-r--r-- | website/features/Constructor.html | 3 | ||||
-rw-r--r-- | website/features/GetterSetter.html | 3 | ||||
-rw-r--r-- | website/features/ToString.html | 2 |
3 files changed, 8 insertions, 0 deletions
diff --git a/website/features/Constructor.html b/website/features/Constructor.html index 6a7cfd2f..072e46ed 100644 --- a/website/features/Constructor.html +++ b/website/features/Constructor.html @@ -68,6 +68,9 @@ The <code>@java.beans.ConstructorProperties</code> annotation is never generated for a constructor with no arguments. This also explains why <code>@NoArgsConstructor</code> lacks the <code>suppressConstructorProperties</code> annotation method. The <code>@ConstructorProperties</code> annotation is also omitted for private constructors. The generated static factory methods also do not get <code>@ConstructorProperties</code>, as this annotation can only be added to real constructors. + </p><p> + <code>@XArgsConstructor</code> can also be used on an enum definition. The generated constructor will always be + private, because non-private constructors aren't legal in enums. You don't have to specify <code>AccessLevel.PRIVATE</code>. </p> </div> </div> diff --git a/website/features/GetterSetter.html b/website/features/GetterSetter.html index fd4ed17d..8e7a1ede 100644 --- a/website/features/GetterSetter.html +++ b/website/features/GetterSetter.html @@ -67,6 +67,9 @@ </p><p> Using the <code>AccessLevel.NONE</code> access level simply generates nothing. It's useful only in combination with <a href="Data.html"><code>@Data</code></a> or a class-wide <code>@Getter</code> or <code>@Setter</code>. + </p><p> + <code>@Getter</code> can also be used on enums. <code>@Setter</code> can't, not for a technical reason, but + for a pragmatic one: Setters on enums are an extremely bad idea. </p> </div> </div> diff --git a/website/features/ToString.html b/website/features/ToString.html index e350c265..8ac29bb1 100644 --- a/website/features/ToString.html +++ b/website/features/ToString.html @@ -62,6 +62,8 @@ </p><p> If a getter exists for a field to be included, it is called instead of using a direct field reference. This behaviour can be suppressed:<br /> <code>@ToString(doNotUseGetters = true)</code> + </p><p> + <code>@ToString</code> can also be used on an enum definition. </p> </div> </div> |