diff options
author | Roel Spilker <r.spilker@gmail.com> | 2014-03-26 22:33:00 +0100 |
---|---|---|
committer | Roel Spilker <r.spilker@gmail.com> | 2014-03-26 22:33:00 +0100 |
commit | d41ef4bf8370a16121d00146f905e866ac7e5a0b (patch) | |
tree | 614ca16c4187d7ed7adb50625230a80bdef4b68b /website/features/experimental/onX.html | |
parent | 4d24542dac058fcd7c341f9d17c4e8170a8d83a2 (diff) | |
download | lombok-d41ef4bf8370a16121d00146f905e866ac7e5a0b.tar.gz lombok-d41ef4bf8370a16121d00146f905e866ac7e5a0b.tar.bz2 lombok-d41ef4bf8370a16121d00146f905e866ac7e5a0b.zip |
[i659] suppression of @ConstructorProperties should use config instead. Also modified all onX examples to use two underscores.
Diffstat (limited to 'website/features/experimental/onX.html')
-rw-r--r-- | website/features/experimental/onX.html | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/website/features/experimental/onX.html b/website/features/experimental/onX.html index 66b0164f..530d98a4 100644 --- a/website/features/experimental/onX.html +++ b/website/features/experimental/onX.html @@ -42,7 +42,7 @@ </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. </p><p> - The syntax is a little strange; 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. + The syntax is a little strange; 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. </p> </div> <div class="snippets"> @@ -60,7 +60,7 @@ <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> (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. + 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> (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> 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> |