From ef8769d3180b2c6de91a64f69dfa23a2e6e449b9 Mon Sep 17 00:00:00 2001 From: Reinier Zwitserloot Date: Sat, 17 Nov 2012 20:26:58 +0100 Subject: Added all documentation for the onX feature and updated changelog. Now to actually write the feature (Well, rescue it from the onX-removal tag). --- website/features/Constructor.html | 2 ++ 1 file changed, 2 insertions(+) (limited to 'website/features/Constructor.html') diff --git a/website/features/Constructor.html b/website/features/Constructor.html index 48c913b4..c60d915f 100644 --- a/website/features/Constructor.html +++ b/website/features/Constructor.html @@ -35,6 +35,8 @@ Such a static factory method will infer generics, unlike a normal constructor. This means your API users get write MapEntry.of("foo", 5) instead of the much longer new MapEntry<String, Integer>("foo", 5).

+ To put annotations on the generated constructor, you can use onConstructor={@AnnotationsHere}. For more details see the documentation on the onX feature. +

Static fields are skipped by these annotations. Also, a @java.beans.ConstructorProperties annotation is added for all constructors with at least 1 argument, which allows bean editor tools to call the generated constructors. @ConstructorProperties is now in Java 1.6, which means that if your code is intended for compilation on Java 1.5, a compiler error will occur. Running on a JVM 1.5 should be no problem (the annotation will be ignored). To suppress the generation of -- cgit