aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--doc/changelog.markdown1
-rw-r--r--src/core/lombok/AllArgsConstructor.java14
-rw-r--r--src/core/lombok/Getter.java15
-rw-r--r--src/core/lombok/NoArgsConstructor.java14
-rw-r--r--src/core/lombok/RequiredArgsConstructor.java14
-rw-r--r--src/core/lombok/Setter.java21
-rw-r--r--src/core/lombok/eclipse/handlers/HandleCleanup.java22
-rw-r--r--src/core/lombok/eclipse/handlers/HandleConstructor.java18
-rw-r--r--src/core/lombok/eclipse/handlers/HandleGetter.java18
-rw-r--r--src/core/lombok/eclipse/handlers/HandleSetter.java31
-rw-r--r--src/core/lombok/eclipse/handlers/HandleSneakyThrows.java18
-rw-r--r--src/core/lombok/eclipse/handlers/HandleSynchronized.java10
-rw-r--r--src/core/lombok/javac/handlers/HandleConstructor.java20
-rw-r--r--src/core/lombok/javac/handlers/HandleGetter.java22
-rw-r--r--src/core/lombok/javac/handlers/HandleSetter.java30
-rw-r--r--test/transform/resource/after-delombok/Constructors.java22
-rw-r--r--test/transform/resource/after-delombok/GetterOnMethod.java39
-rw-r--r--test/transform/resource/after-delombok/SetterOnMethod.java39
-rw-r--r--test/transform/resource/after-delombok/SetterOnParam.java36
-rw-r--r--test/transform/resource/after-delombok/SetterOnParamAndOnMethod.java8
-rw-r--r--test/transform/resource/after-ecj/Constructors.java13
-rw-r--r--test/transform/resource/after-ecj/GetterOnMethod.java40
-rw-r--r--test/transform/resource/after-ecj/SetterOnMethod.java40
-rw-r--r--test/transform/resource/after-ecj/SetterOnParam.java40
-rw-r--r--test/transform/resource/after-ecj/SetterOnParamAndOnMethod.java9
-rw-r--r--test/transform/resource/after-eclipse/Constructors.java13
-rw-r--r--test/transform/resource/after-eclipse/GetterOnMethod.java40
-rw-r--r--test/transform/resource/after-eclipse/SetterOnMethod.java40
-rw-r--r--test/transform/resource/after-eclipse/SetterOnParam.java40
-rw-r--r--test/transform/resource/after-eclipse/SetterOnParamAndOnMethod.java9
-rw-r--r--test/transform/resource/before/Constructors.java9
-rw-r--r--test/transform/resource/before/GetterOnMethod.java15
-rw-r--r--test/transform/resource/before/SetterOnMethod.java15
-rw-r--r--test/transform/resource/before/SetterOnParam.java15
-rw-r--r--test/transform/resource/before/SetterOnParamAndOnMethod.java3
-rw-r--r--test/transform/resource/messages-delombok/Constructors.java.messages3
-rw-r--r--usage_examples/onXExample_post.jpage42
-rw-r--r--usage_examples/onXExample_pre.jpage24
-rw-r--r--website/download.html7
-rw-r--r--website/features/Delegate.html2
-rw-r--r--website/features/index.html2
-rw-r--r--website/features/onX.html58
-rw-r--r--website/setup/netbeans-enable-annotation-processing-in-editor.pngbin0 -> 130876 bytes
-rw-r--r--website/setup/netbeans.html65
44 files changed, 172 insertions, 784 deletions
diff --git a/doc/changelog.markdown b/doc/changelog.markdown
index 05749055..0a5c5462 100644
--- a/doc/changelog.markdown
+++ b/doc/changelog.markdown
@@ -5,7 +5,6 @@ Lombok Changelog
* FEATURE: Added support for 'val'. Val is an immutable variable that infers its type from the right hand side of an expression. [More…](http://projectlombok.org/features/val.html)
* FEATURE: Added support for several logging frameworks via the `@Log`, `@Slf4j`, etc. annotation. [More…](http://projectlombok.org/features/Log.html)
* FEATURE: Lombok now supports post-compile transformers. [Issue #144](http://code.google.com/p/projectlombok/issues/detail?id=144)
-* FEATURE: `@Getter`, `@Setter`, `@XArgsConstructor` now all support `onMethod=`, `onParam=` and/or `onConstructor=`, which lets you add annotations to generated methods. [More…](http://projectlombok.org/features/onX.html)
* FEATURE: Using `@SneakyThrows` no longer requires a runtime dependency on lombok.jar. In fact, any call to `Lombok.sneakyThrows(ex)` is optimized at the bytecode level and no longer requires you to actually have lombok.jar or lombok-runtime.jar on the classpath.
* FEATURE: @XArgsConstructor, @Getter, and @ToString can now be used on enum declarations. Previously, behaviour of these annotations on enums was undefined.
* FEATURE: @Getter/@Setter (and thus, also @Data) in v0.9.3 and earlier would generate getter and setter method names that did not conform to the beanspec, primarily when faced with boolean properties. This has been fixed. In practice this won't affect you unless you have properties named `isFoo` or `hasFoo`. Now the setter generated for this will be called `setFoo` (as the property name is `foo`) and not `setIsFoo`. Also, `hasFoo` is now no longer special; the names would be `isHasFoo` and `setHasFoo`. The java bean spec does not give `has` special meaning.
diff --git a/src/core/lombok/AllArgsConstructor.java b/src/core/lombok/AllArgsConstructor.java
index 6c6319aa..f0e0e3ff 100644
--- a/src/core/lombok/AllArgsConstructor.java
+++ b/src/core/lombok/AllArgsConstructor.java
@@ -59,18 +59,4 @@ public @interface AllArgsConstructor {
*/
@Deprecated
boolean suppressConstructorProperties() default false;
-
- /**
- * If you want your constructor to have additional annotations, you can specify them here.
- */
- AnyAnnotation[] onConstructor() default {};
-
- /**
- * Placeholder annotation to enable the placement of annotations on the constructor.
- * @deprecated Don't use this annotation, since we might remove it.
- */
- @Deprecated
- @Retention(RetentionPolicy.SOURCE)
- @Target({})
- @interface AnyAnnotation {}
}
diff --git a/src/core/lombok/Getter.java b/src/core/lombok/Getter.java
index c42277b1..485f8cf0 100644
--- a/src/core/lombok/Getter.java
+++ b/src/core/lombok/Getter.java
@@ -59,20 +59,5 @@ public @interface Getter {
*/
lombok.AccessLevel value() default lombok.AccessLevel.PUBLIC;
- /**
- * If you want your getter method to have additional annotations, you can specify them here.<br/>
- * If the {@code @Getter} is put on a type, {@code onMethod} may not be specified.
- */
- AnyAnnotation[] onMethod() default {};
-
boolean lazy() default false;
-
- /**
- * Placeholder annotation to enable the placement of annotations on the getter method.
- * @deprecated Don't use this annotation, since we might remove it.
- */
- @Deprecated
- @Retention(RetentionPolicy.SOURCE)
- @Target({})
- @interface AnyAnnotation {}
}
diff --git a/src/core/lombok/NoArgsConstructor.java b/src/core/lombok/NoArgsConstructor.java
index 9b8544ac..1a885b6f 100644
--- a/src/core/lombok/NoArgsConstructor.java
+++ b/src/core/lombok/NoArgsConstructor.java
@@ -51,18 +51,4 @@ public @interface NoArgsConstructor {
* Sets the access level of the constructor. By default, generated constructors are {@code public}.
*/
AccessLevel access() default lombok.AccessLevel.PUBLIC;
-
- /**
- * If you want your constructor to have additional annotations, you can specify them here.
- */
- AnyAnnotation[] onConstructor() default {};
-
- /**
- * Placeholder annotation to enable the placement of annotations on the constructor.
- * @deprecated Don't use this annotation, since we might remove it.
- */
- @Deprecated
- @Retention(RetentionPolicy.SOURCE)
- @Target({})
- @interface AnyAnnotation {}
}
diff --git a/src/core/lombok/RequiredArgsConstructor.java b/src/core/lombok/RequiredArgsConstructor.java
index 91879d82..ba567268 100644
--- a/src/core/lombok/RequiredArgsConstructor.java
+++ b/src/core/lombok/RequiredArgsConstructor.java
@@ -59,18 +59,4 @@ public @interface RequiredArgsConstructor {
*/
@Deprecated
boolean suppressConstructorProperties() default false;
-
- /**
- * If you want your constructor to have additional annotations, you can specify them here.
- */
- AnyAnnotation[] onConstructor() default {};
-
- /**
- * Placeholder annotation to enable the placement of annotations on the constructor.
- * @deprecated Don't use this annotation, since we might remove it.
- */
- @Deprecated
- @Retention(RetentionPolicy.SOURCE)
- @Target({})
- @interface AnyAnnotation {}
}
diff --git a/src/core/lombok/Setter.java b/src/core/lombok/Setter.java
index 107760a7..c13385d5 100644
--- a/src/core/lombok/Setter.java
+++ b/src/core/lombok/Setter.java
@@ -55,25 +55,4 @@ public @interface Setter {
* If you want your setter to be non-public, you can specify an alternate access level here.
*/
lombok.AccessLevel value() default lombok.AccessLevel.PUBLIC;
-
- /**
- * If you want your setter method to have additional annotations, you can specify them here.
- * If the {@code @Setter} is put on a type, {@code onMethod} may not be specified.
- */
- AnyAnnotation[] onMethod() default {};
-
- /**
- * If you want the parameter of your setter to have additional annotations, you can specify them here.
- * If the {@code @Setter} is put on a type, {@code onParam} may not be specified.
- */
- AnyAnnotation[] onParam() default {};
-
- /**
- * Placeholder annotation to enable the placement of annotations on the setter method or its parameter.
- * @deprecated Don't use this annotation, since we might remove it.
- */
- @Deprecated
- @Retention(RetentionPolicy.SOURCE)
- @Target({})
- @interface AnyAnnotation {}
} \ No newline at end of file
diff --git a/src/core/lombok/eclipse/handlers/HandleCleanup.java b/src/core/lombok/eclipse/handlers/HandleCleanup.java
index 21f7ed41..e17d3d3e 100644
--- a/src/core/lombok/eclipse/handlers/HandleCleanup.java
+++ b/src/core/lombok/eclipse/handlers/HandleCleanup.java
@@ -127,7 +127,7 @@ public class HandleCleanup extends EclipseAnnotationHandler<Cleanup> {
//At this point:
// start-1 = Local Declaration marked with @Cleanup
// start = first instruction that needs to be wrapped into a try block
- // end = last intruction of the scope -OR- last instruction before the next case label in switch statements.
+ // end = last instruction of the scope -OR- last instruction before the next case label in switch statements.
// hence:
// [start, end) = statements for the try block.
@@ -146,6 +146,20 @@ public class HandleCleanup extends EclipseAnnotationHandler<Cleanup> {
Eclipse.setGeneratedBy(tryStatement, ast);
tryStatement.tryBlock = new Block(0);
tryStatement.tryBlock.statements = tryBlock;
+ Eclipse.setGeneratedBy(tryStatement.tryBlock, ast);
+
+ // Positions for in-method generated nodes are special
+ int ss = decl.declarationSourceEnd + 1;
+ int se = ss;
+ if (tryBlock.length > 0) {
+ se = tryBlock[tryBlock.length - 1].sourceEnd + 1; //+1 for the closing semicolon. Yes, there could be spaces. Bummer.
+ tryStatement.sourceStart = ss;
+ tryStatement.sourceEnd = se;
+ tryStatement.tryBlock.sourceStart = ss;
+ tryStatement.tryBlock.sourceEnd = se;
+ }
+
+
newStatements[start] = tryStatement;
Statement[] finallyBlock = new Statement[1];
@@ -190,6 +204,12 @@ public class HandleCleanup extends EclipseAnnotationHandler<Cleanup> {
finallyBlock[0] = ifStatement;
tryStatement.finallyBlock = new Block(0);
+
+ // Positions for in-method generated nodes are special
+ if (!isSwitch) {
+ tryStatement.finallyBlock.sourceStart = blockNode.sourceEnd;
+ tryStatement.finallyBlock.sourceEnd = blockNode.sourceEnd;
+ }
Eclipse.setGeneratedBy(tryStatement.finallyBlock, ast);
tryStatement.finallyBlock.statements = finallyBlock;
diff --git a/src/core/lombok/eclipse/handlers/HandleConstructor.java b/src/core/lombok/eclipse/handlers/HandleConstructor.java
index 781e8dae..9af7a48c 100644
--- a/src/core/lombok/eclipse/handlers/HandleConstructor.java
+++ b/src/core/lombok/eclipse/handlers/HandleConstructor.java
@@ -81,8 +81,7 @@ public class HandleConstructor {
String staticName = ann.staticName();
if (level == AccessLevel.NONE) return;
List<EclipseNode> fields = new ArrayList<EclipseNode>();
- Annotation[] onConstructor = getAndRemoveAnnotationParameter(ast, "onConstructor");
- new HandleConstructor().generateConstructor(typeNode, level, fields, staticName, onConstructor, false, false, ast);
+ new HandleConstructor().generateConstructor(typeNode, level, fields, staticName, false, false, ast);
}
}
@@ -97,8 +96,7 @@ public class HandleConstructor {
@SuppressWarnings("deprecation")
boolean suppressConstructorProperties = ann.suppressConstructorProperties();
if (level == AccessLevel.NONE) return;
- Annotation[] onConstructor = getAndRemoveAnnotationParameter(ast, "onConstructor");
- new HandleConstructor().generateConstructor(typeNode, level, findRequiredFields(typeNode), staticName, onConstructor, false, suppressConstructorProperties, ast);
+ new HandleConstructor().generateConstructor(typeNode, level, findRequiredFields(typeNode), staticName, false, suppressConstructorProperties, ast);
}
}
@@ -137,8 +135,7 @@ public class HandleConstructor {
fields.add(child);
}
- Annotation[] onConstructor = getAndRemoveAnnotationParameter(ast, "onConstructor");
- new HandleConstructor().generateConstructor(typeNode, level, fields, staticName, onConstructor, false, suppressConstructorProperties, ast);
+ new HandleConstructor().generateConstructor(typeNode, level, fields, staticName, false, suppressConstructorProperties, ast);
}
}
@@ -157,10 +154,10 @@ public class HandleConstructor {
}
public void generateRequiredArgsConstructor(EclipseNode typeNode, AccessLevel level, String staticName, boolean skipIfConstructorExists, ASTNode source) {
- generateConstructor(typeNode, level, findRequiredFields(typeNode), staticName, null, skipIfConstructorExists, false, source);
+ generateConstructor(typeNode, level, findRequiredFields(typeNode), staticName, skipIfConstructorExists, false, source);
}
- public void generateConstructor(EclipseNode typeNode, AccessLevel level, List<EclipseNode> fields, String staticName, Annotation[] onConstructor, boolean skipIfConstructorExists, boolean suppressConstructorProperties, ASTNode source) {
+ public void generateConstructor(EclipseNode typeNode, AccessLevel level, List<EclipseNode> fields, String staticName, boolean skipIfConstructorExists, boolean suppressConstructorProperties, ASTNode source) {
if (skipIfConstructorExists && constructorExists(typeNode) != MemberExistsResult.NOT_EXISTS) return;
if (skipIfConstructorExists) {
for (EclipseNode child : typeNode.down()) {
@@ -175,7 +172,7 @@ public class HandleConstructor {
boolean staticConstrRequired = staticName != null && !staticName.equals("");
- ConstructorDeclaration constr = createConstructor(staticConstrRequired ? AccessLevel.PRIVATE : level, typeNode, fields, suppressConstructorProperties, onConstructor, source);
+ ConstructorDeclaration constr = createConstructor(staticConstrRequired ? AccessLevel.PRIVATE : level, typeNode, fields, suppressConstructorProperties, source);
injectMethod(typeNode, constr);
if (staticConstrRequired) {
MethodDeclaration staticConstr = createStaticConstructor(level, staticName, typeNode, fields, source);
@@ -218,7 +215,7 @@ public class HandleConstructor {
}
private ConstructorDeclaration createConstructor(AccessLevel level,
- EclipseNode type, Collection<EclipseNode> fields, boolean suppressConstructorProperties, Annotation[] onConstructor, ASTNode source) {
+ EclipseNode type, Collection<EclipseNode> fields, boolean suppressConstructorProperties, ASTNode source) {
long p = (long)source.sourceStart << 32 | source.sourceEnd;
boolean isEnum = (((TypeDeclaration)type.get()).modifiers & ClassFileConstants.AccEnum) != 0;
@@ -230,7 +227,6 @@ public class HandleConstructor {
Eclipse.setGeneratedBy(constructor, source);
constructor.modifiers = EclipseHandlerUtil.toEclipseModifier(level);
- constructor.annotations = onConstructor;
constructor.selector = ((TypeDeclaration)type.get()).name;
constructor.constructorCall = new ExplicitConstructorCall(ExplicitConstructorCall.ImplicitSuper);
Eclipse.setGeneratedBy(constructor.constructorCall, source);
diff --git a/src/core/lombok/eclipse/handlers/HandleGetter.java b/src/core/lombok/eclipse/handlers/HandleGetter.java
index 88b24f8c..7dec8550 100644
--- a/src/core/lombok/eclipse/handlers/HandleGetter.java
+++ b/src/core/lombok/eclipse/handlers/HandleGetter.java
@@ -95,7 +95,7 @@ public class HandleGetter extends EclipseAnnotationHandler<Getter> {
}
for (EclipseNode field : typeNode.down()) {
- if (fieldQualifiesForGetterGeneration(field)) generateGetterForField(field, pos.get(), level, null, false);
+ if (fieldQualifiesForGetterGeneration(field)) generateGetterForField(field, pos.get(), level, false);
}
return true;
}
@@ -118,7 +118,7 @@ public class HandleGetter extends EclipseAnnotationHandler<Getter> {
* If not, the getter is still generated if it isn't already there, though there will not
* be a warning if its already there. The default access level is used.
*/
- public void generateGetterForField(EclipseNode fieldNode, ASTNode pos, AccessLevel level, Annotation[] onMethod, boolean lazy) {
+ public void generateGetterForField(EclipseNode fieldNode, ASTNode pos, AccessLevel level, boolean lazy) {
for (EclipseNode child : fieldNode.down()) {
if (child.getKind() == Kind.ANNOTATION) {
if (annotationTypeMatches(Getter.class, child)) {
@@ -128,7 +128,7 @@ public class HandleGetter extends EclipseAnnotationHandler<Getter> {
}
}
- createGetterForField(level, fieldNode, fieldNode, pos, false, onMethod, lazy);
+ createGetterForField(level, fieldNode, fieldNode, pos, false, lazy);
}
public void handle(AnnotationValues<Getter> annotation, Annotation ast, EclipseNode annotationNode) {
@@ -145,27 +145,25 @@ public class HandleGetter extends EclipseAnnotationHandler<Getter> {
if (node == null) return;
- Annotation[] onMethod = getAndRemoveAnnotationParameter(ast, "onMethod");
switch (node.getKind()) {
case FIELD:
- createGetterForFields(level, annotationNode.upFromAnnotationToFields(), annotationNode, annotationNode.get(), true, onMethod, lazy);
+ createGetterForFields(level, annotationNode.upFromAnnotationToFields(), annotationNode, annotationNode.get(), true, lazy);
break;
case TYPE:
- if (onMethod != null && onMethod.length != 0) annotationNode.addError("'onMethod' is not supported for @Getter on a type.");
if (lazy) annotationNode.addError("'lazy' is not supported for @Getter on a type.");
generateGetterForType(node, annotationNode, level, false);
break;
}
}
- private void createGetterForFields(AccessLevel level, Collection<EclipseNode> fieldNodes, EclipseNode errorNode, ASTNode source, boolean whineIfExists, Annotation[] onMethod, boolean lazy) {
+ private void createGetterForFields(AccessLevel level, Collection<EclipseNode> fieldNodes, EclipseNode errorNode, ASTNode source, boolean whineIfExists, boolean lazy) {
for (EclipseNode fieldNode : fieldNodes) {
- createGetterForField(level, fieldNode, errorNode, source, whineIfExists, onMethod, lazy);
+ createGetterForField(level, fieldNode, errorNode, source, whineIfExists, lazy);
}
}
private void createGetterForField(AccessLevel level,
- EclipseNode fieldNode, EclipseNode errorNode, ASTNode source, boolean whineIfExists, Annotation[] onMethod, boolean lazy) {
+ EclipseNode fieldNode, EclipseNode errorNode, ASTNode source, boolean whineIfExists, boolean lazy) {
if (fieldNode.getKind() != Kind.FIELD) {
errorNode.addError("@Getter is only supported on a class or a field.");
return;
@@ -209,7 +207,7 @@ public class HandleGetter extends EclipseAnnotationHandler<Getter> {
}
MethodDeclaration method = generateGetter((TypeDeclaration) fieldNode.up().get(), fieldNode, getterName, modifier, source, lazy);
- Annotation[] copiedAnnotations = copyAnnotations(source, findAnnotations(field, TransformationsUtil.NON_NULL_PATTERN), findAnnotations(field, TransformationsUtil.NULLABLE_PATTERN), onMethod);
+ Annotation[] copiedAnnotations = copyAnnotations(source, findAnnotations(field, TransformationsUtil.NON_NULL_PATTERN), findAnnotations(field, TransformationsUtil.NULLABLE_PATTERN));
if (copiedAnnotations.length != 0) {
method.annotations = copiedAnnotations;
}
diff --git a/src/core/lombok/eclipse/handlers/HandleSetter.java b/src/core/lombok/eclipse/handlers/HandleSetter.java
index 1f1ab628..5f684410 100644
--- a/src/core/lombok/eclipse/handlers/HandleSetter.java
+++ b/src/core/lombok/eclipse/handlers/HandleSetter.java
@@ -58,7 +58,6 @@ import org.mangosdk.spi.ProviderFor;
*/
@ProviderFor(EclipseAnnotationHandler.class)
public class HandleSetter extends EclipseAnnotationHandler<Setter> {
- private static final Annotation[] EMPTY_ANNOTATIONS_ARRAY = new Annotation[0];
public boolean generateSetterForType(EclipseNode typeNode, EclipseNode pos, AccessLevel level, boolean checkForTypeLevelSetter) {
if (checkForTypeLevelSetter) {
if (typeNode != null) for (EclipseNode child : typeNode.down()) {
@@ -90,7 +89,7 @@ public class HandleSetter extends EclipseAnnotationHandler<Setter> {
//Skip final fields.
if ((fieldDecl.modifiers & ClassFileConstants.AccFinal) != 0) continue;
- generateSetterForField(field, pos.get(), level, EMPTY_ANNOTATIONS_ARRAY, EMPTY_ANNOTATIONS_ARRAY);
+ generateSetterForField(field, pos.get(), level);
}
return true;
}
@@ -107,7 +106,7 @@ public class HandleSetter extends EclipseAnnotationHandler<Setter> {
* If not, the setter is still generated if it isn't already there, though there will not
* be a warning if its already there. The default access level is used.
*/
- public void generateSetterForField(EclipseNode fieldNode, ASTNode pos, AccessLevel level, Annotation[] onMethod , Annotation[] onParam) {
+ public void generateSetterForField(EclipseNode fieldNode, ASTNode pos, AccessLevel level) {
for (EclipseNode child : fieldNode.down()) {
if (child.getKind() == Kind.ANNOTATION) {
if (annotationTypeMatches(Setter.class, child)) {
@@ -117,7 +116,7 @@ public class HandleSetter extends EclipseAnnotationHandler<Setter> {
}
}
- createSetterForField(level, fieldNode, fieldNode, pos, false, onMethod, onParam);
+ createSetterForField(level, fieldNode, fieldNode, pos, false);
}
public void handle(AnnotationValues<Setter> annotation, Annotation ast, EclipseNode annotationNode) {
@@ -125,29 +124,24 @@ public class HandleSetter extends EclipseAnnotationHandler<Setter> {
AccessLevel level = annotation.getInstance().value();
if (level == AccessLevel.NONE || node == null) return;
- Annotation[] onMethod = getAndRemoveAnnotationParameter(ast, "onMethod");
- Annotation[] onParam = getAndRemoveAnnotationParameter(ast, "onParam");
-
switch (node.getKind()) {
case FIELD:
- createSetterForFields(level, annotationNode.upFromAnnotationToFields(), annotationNode, annotationNode.get(), true, onMethod, onParam);
+ createSetterForFields(level, annotationNode.upFromAnnotationToFields(), annotationNode, annotationNode.get(), true);
break;
case TYPE:
- if (onMethod != null && onMethod.length != 0) annotationNode.addError("'onMethod' is not supported for @Setter on a type.");
- if (onParam != null && onParam.length != 0) annotationNode.addError("'onParam' is not supported for @Setter on a type.");
generateSetterForType(node, annotationNode, level, false);
break;
}
}
- private void createSetterForFields(AccessLevel level, Collection<EclipseNode> fieldNodes, EclipseNode errorNode, ASTNode source, boolean whineIfExists, Annotation[] onMethod , Annotation[] onParam) {
+ private void createSetterForFields(AccessLevel level, Collection<EclipseNode> fieldNodes, EclipseNode errorNode, ASTNode source, boolean whineIfExists) {
for (EclipseNode fieldNode : fieldNodes) {
- createSetterForField(level, fieldNode, errorNode, source, whineIfExists, onMethod, onParam);
+ createSetterForField(level, fieldNode, errorNode, source, whineIfExists);
}
}
private void createSetterForField(AccessLevel level,
- EclipseNode fieldNode, EclipseNode errorNode, ASTNode source, boolean whineIfExists, Annotation[] onMethod , Annotation[] onParam) {
+ EclipseNode fieldNode, EclipseNode errorNode, ASTNode source, boolean whineIfExists) {
if (fieldNode.getKind() != Kind.FIELD) {
errorNode.addError("@Setter is only supported on a class or a field.");
return;
@@ -178,16 +172,11 @@ public class HandleSetter extends EclipseAnnotationHandler<Setter> {
}
}
- MethodDeclaration method = generateSetter((TypeDeclaration) fieldNode.up().get(), fieldNode, setterName, modifier, source, onParam);
- Annotation[] copiedAnnotations = copyAnnotations(source, onMethod);
- if (copiedAnnotations.length != 0) {
- method.annotations = copiedAnnotations;
- }
-
+ MethodDeclaration method = generateSetter((TypeDeclaration) fieldNode.up().get(), fieldNode, setterName, modifier, source);
injectMethod(fieldNode.up(), method);
}
- private MethodDeclaration generateSetter(TypeDeclaration parent, EclipseNode fieldNode, String name, int modifier, ASTNode source, Annotation[] onParam) {
+ private MethodDeclaration generateSetter(TypeDeclaration parent, EclipseNode fieldNode, String name, int modifier, ASTNode source) {
FieldDeclaration field = (FieldDeclaration) fieldNode.get();
int pS = source.sourceStart, pE = source.sourceEnd;
long p = (long)pS << 32 | pE;
@@ -225,7 +214,7 @@ public class HandleSetter extends EclipseAnnotationHandler<Setter> {
if (nullCheck != null) method.statements = new Statement[] { nullCheck, assignment };
else method.statements = new Statement[] { assignment };
}
- Annotation[] copiedAnnotations = copyAnnotations(source, nonNulls, nullables, onParam);
+ Annotation[] copiedAnnotations = copyAnnotations(source, nonNulls, nullables);
if (copiedAnnotations.length != 0) param.annotations = copiedAnnotations;
return method;
}
diff --git a/src/core/lombok/eclipse/handlers/HandleSneakyThrows.java b/src/core/lombok/eclipse/handlers/HandleSneakyThrows.java
index 4e9070f3..73940dea 100644
--- a/src/core/lombok/eclipse/handlers/HandleSneakyThrows.java
+++ b/src/core/lombok/eclipse/handlers/HandleSneakyThrows.java
@@ -155,21 +155,25 @@ public class HandleSneakyThrows extends EclipseAnnotationHandler<SneakyThrows> {
Statement[] contents = method.statements;
for (DeclaredException exception : exceptions) {
- contents = new Statement[] { buildTryCatchBlock(contents, exception, exception.node) };
+ contents = new Statement[] { buildTryCatchBlock(contents, exception, exception.node, method) };
}
method.statements = contents;
annotation.up().rebuild();
}
- private Statement buildTryCatchBlock(Statement[] contents, DeclaredException exception, ASTNode source) {
+ private Statement buildTryCatchBlock(Statement[] contents, DeclaredException exception, ASTNode source, AbstractMethodDeclaration method) {
long p = exception.getPos();
int pS = (int)(p >> 32), pE = (int)p;
TryStatement tryStatement = new TryStatement();
Eclipse.setGeneratedBy(tryStatement, source);
tryStatement.tryBlock = new Block(0);
+
+ // Positions for in-method generated nodes are special
+// tryStatement.tryBlock.sourceStart = method.bodyStart; tryStatement.tryBlock.sourceEnd = method.bodyEnd;
tryStatement.tryBlock.sourceStart = pS; tryStatement.tryBlock.sourceEnd = pE;
+
Eclipse.setGeneratedBy(tryStatement.tryBlock, source);
tryStatement.tryBlock.statements = contents;
TypeReference typeReference;
@@ -212,13 +216,23 @@ public class HandleSneakyThrows extends EclipseAnnotationHandler<SneakyThrows> {
sneakyThrowStatement.sourceStart = pS;
sneakyThrowStatement.sourceEnd = sneakyThrowStatement.statementEnd = pE;
Statement rethrowStatement = new ThrowStatement(sneakyThrowStatement, pS, pE);
+
+ // Positions for in-method generated nodes are special
+ rethrowStatement.sourceStart = method.bodyEnd;
+ rethrowStatement.sourceEnd = method.bodyEnd;
+
Eclipse.setGeneratedBy(rethrowStatement, source);
Block block = new Block(0);
block.sourceStart = pS;
block.sourceEnd = pE;
Eclipse.setGeneratedBy(block, source);
block.statements = new Statement[] { rethrowStatement };
+
tryStatement.catchBlocks = new Block[] { block };
+
+ // Positions for in-method generated nodes are special
+ tryStatement.sourceStart = method.bodyStart;
+ tryStatement.sourceEnd = method.bodyEnd;
tryStatement.sourceStart = pS;
tryStatement.sourceEnd = pE;
return tryStatement;
diff --git a/src/core/lombok/eclipse/handlers/HandleSynchronized.java b/src/core/lombok/eclipse/handlers/HandleSynchronized.java
index 3f545966..ce1ac315 100644
--- a/src/core/lombok/eclipse/handlers/HandleSynchronized.java
+++ b/src/core/lombok/eclipse/handlers/HandleSynchronized.java
@@ -129,6 +129,11 @@ public class HandleSynchronized extends EclipseAnnotationHandler<Synchronized> {
Block block = new Block(0);
Eclipse.setGeneratedBy(block, source);
block.statements = method.statements;
+
+ // Positions for in-method generated nodes are special
+ block.sourceEnd = method.bodyEnd;
+ block.sourceStart = method.bodyStart;
+
Expression lockVariable;
if (method.isStatic()) lockVariable = new QualifiedNameReference(new char[][] {
methodNode.up().getName().toCharArray(), lockName }, new long[] { pos, pos }, p1, p2);
@@ -143,6 +148,11 @@ public class HandleSynchronized extends EclipseAnnotationHandler<Synchronized> {
method.statements = new Statement[] {
new SynchronizedStatement(lockVariable, block, 0, 0)
};
+
+ // Positions for in-method generated nodes are special
+ method.statements[0].sourceEnd = method.bodyEnd;
+ method.statements[0].sourceStart = method.bodyStart;
+
Eclipse.setGeneratedBy(method.statements[0], source);
methodNode.rebuild();
diff --git a/src/core/lombok/javac/handlers/HandleConstructor.java b/src/core/lombok/javac/handlers/HandleConstructor.java
index 1aab828d..212daf16 100644
--- a/src/core/lombok/javac/handlers/HandleConstructor.java
+++ b/src/core/lombok/javac/handlers/HandleConstructor.java
@@ -69,8 +69,7 @@ public class HandleConstructor {
String staticName = ann.staticName();
if (level == AccessLevel.NONE) return;
List<JavacNode> fields = List.nil();
- List<JCExpression> onConstructor = getAndRemoveAnnotationParameter(ast, "onConstructor");
- new HandleConstructor().generateConstructor(typeNode, level, fields, staticName, onConstructor, false, false, annotationNode);
+ new HandleConstructor().generateConstructor(typeNode, level, fields, staticName, false, false, annotationNode);
}
}
@@ -87,8 +86,7 @@ public class HandleConstructor {
@SuppressWarnings("deprecation")
boolean suppressConstructorProperties = ann.suppressConstructorProperties();
if (level == AccessLevel.NONE) return;
- List<JCExpression> onConstructor = getAndRemoveAnnotationParameter(ast, "onConstructor");
- new HandleConstructor().generateConstructor(typeNode, level, findRequiredFields(typeNode), staticName, onConstructor, false, suppressConstructorProperties, annotationNode);
+ new HandleConstructor().generateConstructor(typeNode, level, findRequiredFields(typeNode), staticName, false, suppressConstructorProperties, annotationNode);
}
}
@@ -135,8 +133,7 @@ public class HandleConstructor {
if (((fieldFlags & Flags.FINAL) != 0) && fieldDecl.init != null) continue;
fields.append(child);
}
- List<JCExpression> onConstructor = getAndRemoveAnnotationParameter(ast, "onConstructor");
- new HandleConstructor().generateConstructor(typeNode, level, fields.toList(), staticName, onConstructor, false, suppressConstructorProperties, annotationNode);
+ new HandleConstructor().generateConstructor(typeNode, level, fields.toList(), staticName, false, suppressConstructorProperties, annotationNode);
}
}
@@ -155,10 +152,10 @@ public class HandleConstructor {
}
public void generateRequiredArgsConstructor(JavacNode typeNode, AccessLevel level, String staticName, boolean skipIfConstructorExists, JavacNode source) {
- generateConstructor(typeNode, level, findRequiredFields(typeNode), staticName, List.<JCExpression>nil(), skipIfConstructorExists, false, source);
+ generateConstructor(typeNode, level, findRequiredFields(typeNode), staticName, skipIfConstructorExists, false, source);
}
- public void generateConstructor(JavacNode typeNode, AccessLevel level, List<JavacNode> fields, String staticName, List<JCExpression> onConstructor, boolean skipIfConstructorExists, boolean suppressConstructorProperties, JavacNode source) {
+ public void generateConstructor(JavacNode typeNode, AccessLevel level, List<JavacNode> fields, String staticName, boolean skipIfConstructorExists, boolean suppressConstructorProperties, JavacNode source) {
if (skipIfConstructorExists && constructorExists(typeNode) != MemberExistsResult.NOT_EXISTS) return;
if (skipIfConstructorExists) {
for (JavacNode child : typeNode.down()) {
@@ -173,7 +170,7 @@ public class HandleConstructor {
boolean staticConstrRequired = staticName != null && !staticName.equals("");
- JCMethodDecl constr = createConstructor(staticConstrRequired ? AccessLevel.PRIVATE : level, typeNode, fields, onConstructor, suppressConstructorProperties, source.get());
+ JCMethodDecl constr = createConstructor(staticConstrRequired ? AccessLevel.PRIVATE : level, typeNode, fields, suppressConstructorProperties, source.get());
injectMethod(typeNode, constr);
if (staticConstrRequired) {
JCMethodDecl staticConstr = createStaticConstructor(staticName, level, typeNode, fields, source.get());
@@ -194,7 +191,7 @@ public class HandleConstructor {
mods.annotations = mods.annotations.append(annotation);
}
- private JCMethodDecl createConstructor(AccessLevel level, JavacNode typeNode, List<JavacNode> fields, List<JCExpression> onConstructor, boolean suppressConstructorProperties, JCTree source) {
+ private JCMethodDecl createConstructor(AccessLevel level, JavacNode typeNode, List<JavacNode> fields, boolean suppressConstructorProperties, JCTree source) {
TreeMaker maker = typeNode.getTreeMaker();
boolean isEnum = (((JCClassDecl) typeNode.get()).mods.flags & Flags.ENUM) != 0;
@@ -220,8 +217,7 @@ public class HandleConstructor {
}
}
- List<JCAnnotation> annsOnConstructor = copyAnnotations(onConstructor);
- JCModifiers mods = maker.Modifiers(toJavacModifier(level), annsOnConstructor);
+ JCModifiers mods = maker.Modifiers(toJavacModifier(level), List.<JCAnnotation>nil());
if (!suppressConstructorProperties && level != AccessLevel.PRIVATE && !isLocalType(typeNode)) {
addConstructorProperties(mods, typeNode, fields);
}
diff --git a/src/core/lombok/javac/handlers/HandleGetter.java b/src/core/lombok/javac/handlers/HandleGetter.java
index e61ad7d7..0be00d89 100644
--- a/src/core/lombok/javac/handlers/HandleGetter.java
+++ b/src/core/lombok/javac/handlers/HandleGetter.java
@@ -93,7 +93,7 @@ public class HandleGetter extends JavacAnnotationHandler<Getter> {
}
for (JavacNode field : typeNode.down()) {
- if (fieldQualifiesForGetterGeneration(field)) generateGetterForField(field, errorNode.get(), level, List.<JCExpression>nil(), false);
+ if (fieldQualifiesForGetterGeneration(field)) generateGetterForField(field, errorNode.get(), level, false);
}
}
@@ -122,7 +122,7 @@ public class HandleGetter extends JavacAnnotationHandler<Getter> {
* @param fieldNode The node representing the field you want a getter for.
* @param pos The node responsible for generating the getter (the {@code @Data} or {@code @Getter} annotation).
*/
- public void generateGetterForField(JavacNode fieldNode, DiagnosticPosition pos, AccessLevel level, List<JCExpression> onMethod, boolean lazy) {
+ public void generateGetterForField(JavacNode fieldNode, DiagnosticPosition pos, AccessLevel level, boolean lazy) {
for (JavacNode child : fieldNode.down()) {
if (child.getKind() == Kind.ANNOTATION) {
if (Javac.annotationTypeMatches(Getter.class, child)) {
@@ -132,7 +132,7 @@ public class HandleGetter extends JavacAnnotationHandler<Getter> {
}
}
- createGetterForField(level, fieldNode, fieldNode, false, onMethod, lazy);
+ createGetterForField(level, fieldNode, fieldNode, false, lazy);
}
@Override public void handle(AnnotationValues<Getter> annotation, JCAnnotation ast, JavacNode annotationNode) {
@@ -152,27 +152,25 @@ public class HandleGetter extends JavacAnnotationHandler<Getter> {
if (node == null) return;
- List<JCExpression> onMethod = getAndRemoveAnnotationParameter(ast, "onMethod");
switch (node.getKind()) {
case FIELD:
- createGetterForFields(level, fields, annotationNode, true, onMethod, lazy);
+ createGetterForFields(level, fields, annotationNode, true, lazy);
break;
case TYPE:
- if (!onMethod.isEmpty()) annotationNode.addError("'onMethod' is not supported for @Getter on a type.");
if (lazy) annotationNode.addError("'lazy' is not supported for @Getter on a type.");
generateGetterForType(node, annotationNode, level, false);
break;
}
}
- private void createGetterForFields(AccessLevel level, Collection<JavacNode> fieldNodes, JavacNode errorNode, boolean whineIfExists, List<JCExpression> onMethod, boolean lazy) {
+ private void createGetterForFields(AccessLevel level, Collection<JavacNode> fieldNodes, JavacNode errorNode, boolean whineIfExists, boolean lazy) {
for (JavacNode fieldNode : fieldNodes) {
- createGetterForField(level, fieldNode, errorNode, whineIfExists, onMethod, lazy);
+ createGetterForField(level, fieldNode, errorNode, whineIfExists, lazy);
}
}
private void createGetterForField(AccessLevel level,
- JavacNode fieldNode, JavacNode source, boolean whineIfExists, List<JCExpression> onMethod, boolean lazy) {
+ JavacNode fieldNode, JavacNode source, boolean whineIfExists, boolean lazy) {
if (fieldNode.getKind() != Kind.FIELD) {
source.addError("@Getter is only supported on a class or a field.");
return;
@@ -213,10 +211,10 @@ public class HandleGetter extends JavacAnnotationHandler<Getter> {
long access = toJavacModifier(level) | (fieldDecl.mods.flags & Flags.STATIC);
- injectMethod(fieldNode.up(), createGetter(access, fieldNode, fieldNode.getTreeMaker(), onMethod, lazy, source.get()));
+ injectMethod(fieldNode.up(), createGetter(access, fieldNode, fieldNode.getTreeMaker(), lazy, source.get()));
}
- private JCMethodDecl createGetter(long access, JavacNode field, TreeMaker treeMaker, List<JCExpression> onMethod, boolean lazy, JCTree source) {
+ private JCMethodDecl createGetter(long access, JavacNode field, TreeMaker treeMaker, boolean lazy, JCTree source) {
JCVariableDecl fieldNode = (JCVariableDecl) field.get();
// Remember the type; lazy will change it;
@@ -242,7 +240,7 @@ public class HandleGetter extends JavacAnnotationHandler<Getter> {
List<JCAnnotation> nonNulls = findAnnotations(field, TransformationsUtil.NON_NULL_PATTERN);
List<JCAnnotation> nullables = findAnnotations(field, TransformationsUtil.NULLABLE_PATTERN);
- List<JCAnnotation> annsOnMethod = copyAnnotations(onMethod).appendList(nonNulls).appendList(nullables);
+ List<JCAnnotation> annsOnMethod = nonNulls.appendList(nullables);
JCMethodDecl decl = Javac.recursiveSetGeneratedBy(treeMaker.MethodDef(treeMaker.Modifiers(access, annsOnMethod), methodName, methodType,
methodGenericParams, parameters, throwsClauses, methodBody, annotationMethodDefaultValue), source);
diff --git a/src/core/lombok/javac/handlers/HandleSetter.java b/src/core/lombok/javac/handlers/HandleSetter.java
index 7763a017..8e29d974 100644
--- a/src/core/lombok/javac/handlers/HandleSetter.java
+++ b/src/core/lombok/javac/handlers/HandleSetter.java
@@ -96,7 +96,7 @@ public class HandleSetter extends JavacAnnotationHandler<Setter> {
//Skip final fields.
if ((fieldDecl.mods.flags & Flags.FINAL) != 0) continue;
- generateSetterForField(field, errorNode.get(), level, List.<JCExpression>nil(), List.<JCExpression>nil());
+ generateSetterForField(field, errorNode.get(), level);
}
}
@@ -115,7 +115,7 @@ public class HandleSetter extends JavacAnnotationHandler<Setter> {
* @param fieldNode The node representing the field you want a setter for.
* @param pos The node responsible for generating the setter (the {@code @Data} or {@code @Setter} annotation).
*/
- public void generateSetterForField(JavacNode fieldNode, DiagnosticPosition pos, AccessLevel level, List<JCExpression> onMethod, List<JCExpression> onParam) {
+ public void generateSetterForField(JavacNode fieldNode, DiagnosticPosition pos, AccessLevel level) {
for (JavacNode child : fieldNode.down()) {
if (child.getKind() == Kind.ANNOTATION) {
if (Javac.annotationTypeMatches(Setter.class, child)) {
@@ -125,7 +125,7 @@ public class HandleSetter extends JavacAnnotationHandler<Setter> {
}
}
- createSetterForField(level, fieldNode, fieldNode, false, onMethod, onParam);
+ createSetterForField(level, fieldNode, fieldNode, false);
}
@Override public void handle(AnnotationValues<Setter> annotation, JCAnnotation ast, JavacNode annotationNode) {
@@ -137,32 +137,25 @@ public class HandleSetter extends JavacAnnotationHandler<Setter> {
if (level == AccessLevel.NONE || node == null) return;
- List<JCExpression> onParamList = getAndRemoveAnnotationParameter(ast, "onParam");
- List<JCExpression> onMethodList = getAndRemoveAnnotationParameter(ast, "onMethod");
-
switch (node.getKind()) {
case FIELD:
- createSetterForFields(level, fields, annotationNode, true, onMethodList, onParamList);
+ createSetterForFields(level, fields, annotationNode, true);
break;
case TYPE:
- if (!onMethodList.isEmpty()) annotationNode.addError("'onMethod' is not supported for @Setter on a type.");
- if (!onParamList.isEmpty()) annotationNode.addError("'onParam' is not supported for @Setter on a type.");
-
generateSetterForType(node, annotationNode, level, false);
break;
}
}
- private void createSetterForFields(AccessLevel level, Collection<JavacNode> fieldNodes, JavacNode errorNode, boolean whineIfExists,
- List<JCExpression> onMethod, List<JCExpression> onParam) {
+ private void createSetterForFields(AccessLevel level, Collection<JavacNode> fieldNodes, JavacNode errorNode, boolean whineIfExists) {
for (JavacNode fieldNode : fieldNodes) {
- createSetterForField(level, fieldNode, errorNode, whineIfExists, onMethod, onParam);
+ createSetterForField(level, fieldNode, errorNode, whineIfExists);
}
}
private void createSetterForField(AccessLevel level,
- JavacNode fieldNode, JavacNode source, boolean whineIfExists, List<JCExpression> onMethod, List<JCExpression> onParam) {
+ JavacNode fieldNode, JavacNode source, boolean whineIfExists) {
if (fieldNode.getKind() != Kind.FIELD) {
fieldNode.addError("@Setter is only supported on a class or a field.");
@@ -192,10 +185,10 @@ public class HandleSetter extends JavacAnnotationHandler<Setter> {
long access = toJavacModifier(level) | (fieldDecl.mods.flags & Flags.STATIC);
- injectMethod(fieldNode.up(), createSetter(access, fieldNode, fieldNode.getTreeMaker(), onMethod, onParam, source.get()));
+ injectMethod(fieldNode.up(), createSetter(access, fieldNode, fieldNode.getTreeMaker(), source.get()));
}
- private JCMethodDecl createSetter(long access, JavacNode field, TreeMaker treeMaker, List<JCExpression> onMethod, List<JCExpression> onParam, JCTree source) {
+ private JCMethodDecl createSetter(long access, JavacNode field, TreeMaker treeMaker, JCTree source) {
JCVariableDecl fieldDecl = (JCVariableDecl) field.get();
JCExpression fieldRef = createFieldAccessor(treeMaker, field, FieldAccess.ALWAYS_FIELD);
@@ -215,8 +208,7 @@ public class HandleSetter extends JavacAnnotationHandler<Setter> {
JCBlock methodBody = treeMaker.Block(0, statements);
Name methodName = field.toName(toSetterName(fieldDecl));
- List<JCAnnotation> annsOnParam = copyAnnotations(onParam);
- annsOnParam = annsOnParam.appendList(nonNulls).appendList(nullables);
+ List<JCAnnotation> annsOnParam = nonNulls.appendList(nullables);
JCVariableDecl param = treeMaker.VarDef(treeMaker.Modifiers(Flags.FINAL, annsOnParam), fieldDecl.name, fieldDecl.vartype, null);
//WARNING: Do not use field.getSymbolTable().voidType - that field has gone through non-backwards compatible API changes within javac1.6.
JCExpression methodType = treeMaker.Type(new JCNoType(Javac.getCTCint(TypeTags.class, "VOID")));
@@ -226,7 +218,7 @@ public class HandleSetter extends JavacAnnotationHandler<Setter> {
List<JCExpression> throwsClauses = List.nil();
JCExpression annotationMethodDefaultValue = null;
- return Javac.recursiveSetGeneratedBy(treeMaker.MethodDef(treeMaker.Modifiers(access, copyAnnotations(onMethod)), methodName, methodType,
+ return Javac.recursiveSetGeneratedBy(treeMaker.MethodDef(treeMaker.Modifiers(access, List.<JCAnnotation>nil()), methodName, methodType,
methodGenericParams, parameters, throwsClauses, methodBody, annotationMethodDefaultValue), source);
}
diff --git a/test/transform/resource/after-delombok/Constructors.java b/test/transform/resource/after-delombok/Constructors.java
index f8b090a1..fb906c73 100644
--- a/test/transform/resource/after-delombok/Constructors.java
+++ b/test/transform/resource/after-delombok/Constructors.java
@@ -1,56 +1,36 @@
class RequiredArgsConstructor1 {
final int x;
String name;
-
@java.beans.ConstructorProperties({"x"})
@java.lang.SuppressWarnings("all")
public RequiredArgsConstructor1(final int x) {
this.x = x;
}
}
-
class RequiredArgsConstructorAccess {
final int x;
String name;
-
@java.beans.ConstructorProperties({"x"})
@java.lang.SuppressWarnings("all")
protected RequiredArgsConstructorAccess(final int x) {
this.x = x;
}
}
-
class RequiredArgsConstructorStaticName {
final int x;
String name;
-
@java.lang.SuppressWarnings("all")
private RequiredArgsConstructorStaticName(final int x) {
this.x = x;
}
-
@java.lang.SuppressWarnings("all")
public static RequiredArgsConstructorStaticName staticname(final int x) {
return new RequiredArgsConstructorStaticName(x);
}
}
-
-class RequiredArgsConstructorWithAnnotations {
- final int x;
- String name;
-
- @Deprecated
- @java.beans.ConstructorProperties({"x"})
- @java.lang.SuppressWarnings("all")
- public RequiredArgsConstructorWithAnnotations(final int x) {
- this.x = x;
- }
-}
-
class AllArgsConstructor1 {
final int x;
String name;
-
@java.beans.ConstructorProperties({"x", "name"})
@java.lang.SuppressWarnings("all")
public AllArgsConstructor1(final int x, final String name) {
@@ -58,11 +38,9 @@ class AllArgsConstructor1 {
this.name = name;
}
}
-
class NoArgsConstructor1 {
final int x;
String name;
-
@java.lang.SuppressWarnings("all")
public NoArgsConstructor1() {
}
diff --git a/test/transform/resource/after-delombok/GetterOnMethod.java b/test/transform/resource/after-delombok/GetterOnMethod.java
deleted file mode 100644
index 0c18170b..00000000
--- a/test/transform/resource/after-delombok/GetterOnMethod.java
+++ /dev/null
@@ -1,39 +0,0 @@
-class GetterOnMethod {
- int i;
- int j;
- @Deprecated
- @java.lang.SuppressWarnings("all")
- public int getI() {
- return this.i;
- }
- @java.lang.Deprecated
- @java.lang.SuppressWarnings("all")
- public int getJ() {
- return this.j;
- }
-}
-class GetterOnClassOnMethod {
- int i;
- int j;
- @java.lang.SuppressWarnings("all")
- public int getI() {
- return this.i;
- }
- @java.lang.SuppressWarnings("all")
- public int getJ() {
- return this.j;
- }
-}
-class GetterOnClassAndOnAField {
- int i;
- int j;
- @java.lang.SuppressWarnings("all")
- public int getI() {
- return this.i;
- }
- @java.lang.Deprecated
- @java.lang.SuppressWarnings("all")
- public int getJ() {
- return this.j;
- }
-} \ No newline at end of file
diff --git a/test/transform/resource/after-delombok/SetterOnMethod.java b/test/transform/resource/after-delombok/SetterOnMethod.java
deleted file mode 100644
index b261ce92..00000000
--- a/test/transform/resource/after-delombok/SetterOnMethod.java
+++ /dev/null
@@ -1,39 +0,0 @@
-class SetterOnMethod {
- int i;
- int j;
- @Deprecated
- @java.lang.SuppressWarnings("all")
- public void setI(final int i) {
- this.i = i;
- }
- @java.lang.Deprecated
- @java.lang.SuppressWarnings("all")
- public void setJ(final int j) {
- this.j = j;
- }
-}
-class SetterOnClassOnMethod {
- int i;
- int j;
- @java.lang.SuppressWarnings("all")
- public void setI(final int i) {
- this.i = i;
- }
- @java.lang.SuppressWarnings("all")
- public void setJ(final int j) {
- this.j = j;
- }
-}
-class SetterOnClassAndOnAField {
- int i;
- int j;
- @java.lang.SuppressWarnings("all")
- public void setI(final int i) {
- this.i = i;
- }
- @java.lang.Deprecated
- @java.lang.SuppressWarnings("all")
- public void setJ(final int j) {
- this.j = j;
- }
-} \ No newline at end of file
diff --git a/test/transform/resource/after-delombok/SetterOnParam.java b/test/transform/resource/after-delombok/SetterOnParam.java
deleted file mode 100644
index 89a55e00..00000000
--- a/test/transform/resource/after-delombok/SetterOnParam.java
+++ /dev/null
@@ -1,36 +0,0 @@
-class SetterOnParam {
- int i;
- int j;
- @java.lang.SuppressWarnings("all")
- public void setI(@SuppressWarnings("all") final int i) {
- this.i = i;
- }
- @java.lang.SuppressWarnings("all")
- public void setJ(@java.lang.SuppressWarnings("all") final int j) {
- this.j = j;
- }
-}
-class SetterOnClassOnParam {
- int i;
- int j;
- @java.lang.SuppressWarnings("all")
- public void setI(final int i) {
- this.i = i;
- }
- @java.lang.SuppressWarnings("all")
- public void setJ(final int j) {
- this.j = j;
- }
-}
-class SetterOnClassAndOnAFieldParam {
- int i;
- int j;
- @java.lang.SuppressWarnings("all")
- public void setI(final int i) {
- this.i = i;
- }
- @java.lang.SuppressWarnings("all")
- public void setJ(@java.lang.SuppressWarnings("all") final int j) {
- this.j = j;
- }
-} \ No newline at end of file
diff --git a/test/transform/resource/after-delombok/SetterOnParamAndOnMethod.java b/test/transform/resource/after-delombok/SetterOnParamAndOnMethod.java
deleted file mode 100644
index a80c3462..00000000
--- a/test/transform/resource/after-delombok/SetterOnParamAndOnMethod.java
+++ /dev/null
@@ -1,8 +0,0 @@
-class SetterOnParamAndOnMethod {
- int i;
- @Deprecated
- @java.lang.SuppressWarnings("all")
- public void setI(@SuppressWarnings("all") final int i) {
- this.i = i;
- }
-} \ No newline at end of file
diff --git a/test/transform/resource/after-ecj/Constructors.java b/test/transform/resource/after-ecj/Constructors.java
index e4fba7ff..e47ec8b5 100644
--- a/test/transform/resource/after-ecj/Constructors.java
+++ b/test/transform/resource/after-ecj/Constructors.java
@@ -6,7 +6,6 @@
this.x = x;
}
}
-
@lombok.RequiredArgsConstructor(access = lombok.AccessLevel.PROTECTED) class RequiredArgsConstructorAccess {
final int x;
String name;
@@ -15,7 +14,6 @@
this.x = x;
}
}
-
@lombok.RequiredArgsConstructor(staticName = "staticname") class RequiredArgsConstructorStaticName {
final int x;
String name;
@@ -27,16 +25,6 @@
return new RequiredArgsConstructorStaticName(x);
}
}
-
-@lombok.RequiredArgsConstructor() class RequiredArgsConstructorWithAnnotations {
- final int x;
- String name;
- public @Deprecated @java.beans.ConstructorProperties({"x"}) @java.lang.SuppressWarnings("all") RequiredArgsConstructorWithAnnotations(final int x) {
- super();
- this.x = x;
- }
-}
-
@lombok.AllArgsConstructor class AllArgsConstructor1 {
final int x;
String name;
@@ -46,7 +34,6 @@
this.name = name;
}
}
-
@lombok.NoArgsConstructor class NoArgsConstructor1 {
final int x;
String name;
diff --git a/test/transform/resource/after-ecj/GetterOnMethod.java b/test/transform/resource/after-ecj/GetterOnMethod.java
deleted file mode 100644
index d7be009b..00000000
--- a/test/transform/resource/after-ecj/GetterOnMethod.java
+++ /dev/null
@@ -1,40 +0,0 @@
-import lombok.Getter;
-class GetterOnMethod {
- @lombok.Getter() int i;
- @lombok.Getter() int j;
- public @Deprecated @java.lang.SuppressWarnings("all") int getI() {
- return this.i;
- }
- public @java.lang.Deprecated @java.lang.SuppressWarnings("all") int getJ() {
- return this.j;
- }
- GetterOnMethod() {
- super();
- }
-}
-@lombok.Getter() class GetterOnClassOnMethod {
- int i;
- int j;
- public @java.lang.SuppressWarnings("all") int getI() {
- return this.i;
- }
- public @java.lang.SuppressWarnings("all") int getJ() {
- return this.j;
- }
- GetterOnClassOnMethod() {
- super();
- }
-}
-@lombok.Getter() class GetterOnClassAndOnAField {
- int i;
- @lombok.Getter() int j;
- public @java.lang.Deprecated @java.lang.SuppressWarnings("all") int getJ() {
- return this.j;
- }
- public @java.lang.SuppressWarnings("all") int getI() {
- return this.i;
- }
- GetterOnClassAndOnAField() {
- super();
- }
-}
diff --git a/test/transform/resource/after-ecj/SetterOnMethod.java b/test/transform/resource/after-ecj/SetterOnMethod.java
deleted file mode 100644
index 8cd9727b..00000000
--- a/test/transform/resource/after-ecj/SetterOnMethod.java
+++ /dev/null
@@ -1,40 +0,0 @@
-import lombok.Setter;
-class SetterOnMethod {
- @lombok.Setter() int i;
- @lombok.Setter() int j;
- public @Deprecated @java.lang.SuppressWarnings("all") void setI(final int i) {
- this.i = i;
- }
- public @java.lang.Deprecated @java.lang.SuppressWarnings("all") void setJ(final int j) {
- this.j = j;
- }
- SetterOnMethod() {
- super();
- }
-}
-@lombok.Setter() class SetterOnClassOnMethod {
- int i;
- int j;
- public @java.lang.SuppressWarnings("all") void setI(final int i) {
- this.i = i;
- }
- public @java.lang.SuppressWarnings("all") void setJ(final int j) {
- this.j = j;
- }
- SetterOnClassOnMethod() {
- super();
- }
-}
-@lombok.Setter() class SetterOnClassAndOnAField {
- int i;
- @lombok.Setter() int j;
- public @java.lang.Deprecated @java.lang.SuppressWarnings("all") void setJ(final int j) {
- this.j = j;
- }
- public @java.lang.SuppressWarnings("all") void setI(final int i) {
- this.i = i;
- }
- SetterOnClassAndOnAField() {
- super();
- }
-}
diff --git a/test/transform/resource/after-ecj/SetterOnParam.java b/test/transform/resource/after-ecj/SetterOnParam.java
deleted file mode 100644
index 3ec7f098..00000000
--- a/test/transform/resource/after-ecj/SetterOnParam.java
+++ /dev/null
@@ -1,40 +0,0 @@
-import lombok.Setter;
-class SetterOnParam {
- @lombok.Setter() int i;
- @lombok.Setter() int j;
- public @java.lang.SuppressWarnings("all") void setI(final @SuppressWarnings("all") int i) {
- this.i = i;
- }
- public @java.lang.SuppressWarnings("all") void setJ(final @java.lang.SuppressWarnings("all") int j) {
- this.j = j;
- }
- SetterOnParam() {
- super();
- }
-}
-@lombok.Setter() class SetterOnClassOnParam {
- int i;
- int j;
- public @java.lang.SuppressWarnings("all") void setI(final int i) {
- this.i = i;
- }
- public @java.lang.SuppressWarnings("all") void setJ(final int j) {
- this.j = j;
- }
- SetterOnClassOnParam() {
- super();
- }
-}
-@lombok.Setter() class SetterOnClassAndOnAFieldParam {
- int i;
- @lombok.Setter() int j;
- public @java.lang.SuppressWarnings("all") void setJ(final @java.lang.SuppressWarnings("all") int j) {
- this.j = j;
- }
- public @java.lang.SuppressWarnings("all") void setI(final int i) {
- this.i = i;
- }
- SetterOnClassAndOnAFieldParam() {
- super();
- }
-}
diff --git a/test/transform/resource/after-ecj/SetterOnParamAndOnMethod.java b/test/transform/resource/after-ecj/SetterOnParamAndOnMethod.java
deleted file mode 100644
index 8d77fc67..00000000
--- a/test/transform/resource/after-ecj/SetterOnParamAndOnMethod.java
+++ /dev/null
@@ -1,9 +0,0 @@
-class SetterOnParamAndOnMethod {
- @lombok.Setter() int i;
- public @Deprecated @java.lang.SuppressWarnings("all") void setI(final @SuppressWarnings("all") int i) {
- this.i = i;
- }
- SetterOnParamAndOnMethod() {
- super();
- }
-}
diff --git a/test/transform/resource/after-eclipse/Constructors.java b/test/transform/resource/after-eclipse/Constructors.java
index e4fba7ff..e47ec8b5 100644
--- a/test/transform/resource/after-eclipse/Constructors.java
+++ b/test/transform/resource/after-eclipse/Constructors.java
@@ -6,7 +6,6 @@
this.x = x;
}
}
-
@lombok.RequiredArgsConstructor(access = lombok.AccessLevel.PROTECTED) class RequiredArgsConstructorAccess {
final int x;
String name;
@@ -15,7 +14,6 @@
this.x = x;
}
}
-
@lombok.RequiredArgsConstructor(staticName = "staticname") class RequiredArgsConstructorStaticName {
final int x;
String name;
@@ -27,16 +25,6 @@
return new RequiredArgsConstructorStaticName(x);
}
}
-
-@lombok.RequiredArgsConstructor() class RequiredArgsConstructorWithAnnotations {
- final int x;
- String name;
- public @Deprecated @java.beans.ConstructorProperties({"x"}) @java.lang.SuppressWarnings("all") RequiredArgsConstructorWithAnnotations(final int x) {
- super();
- this.x = x;
- }
-}
-
@lombok.AllArgsConstructor class AllArgsConstructor1 {
final int x;
String name;
@@ -46,7 +34,6 @@
this.name = name;
}
}
-
@lombok.NoArgsConstructor class NoArgsConstructor1 {
final int x;
String name;
diff --git a/test/transform/resource/after-eclipse/GetterOnMethod.java b/test/transform/resource/after-eclipse/GetterOnMethod.java
deleted file mode 100644
index d7be009b..00000000
--- a/test/transform/resource/after-eclipse/GetterOnMethod.java
+++ /dev/null
@@ -1,40 +0,0 @@
-import lombok.Getter;
-class GetterOnMethod {
- @lombok.Getter() int i;
- @lombok.Getter() int j;
- public @Deprecated @java.lang.SuppressWarnings("all") int getI() {
- return this.i;
- }
- public @java.lang.Deprecated @java.lang.SuppressWarnings("all") int getJ() {
- return this.j;
- }
- GetterOnMethod() {
- super();
- }
-}
-@lombok.Getter() class GetterOnClassOnMethod {
- int i;
- int j;
- public @java.lang.SuppressWarnings("all") int getI() {
- return this.i;
- }
- public @java.lang.SuppressWarnings("all") int getJ() {
- return this.j;
- }
- GetterOnClassOnMethod() {
- super();
- }
-}
-@lombok.Getter() class GetterOnClassAndOnAField {
- int i;
- @lombok.Getter() int j;
- public @java.lang.Deprecated @java.lang.SuppressWarnings("all") int getJ() {
- return this.j;
- }
- public @java.lang.SuppressWarnings("all") int getI() {
- return this.i;
- }
- GetterOnClassAndOnAField() {
- super();
- }
-}
diff --git a/test/transform/resource/after-eclipse/SetterOnMethod.java b/test/transform/resource/after-eclipse/SetterOnMethod.java
deleted file mode 100644
index 8cd9727b..00000000
--- a/test/transform/resource/after-eclipse/SetterOnMethod.java
+++ /dev/null
@@ -1,40 +0,0 @@
-import lombok.Setter;
-class SetterOnMethod {
- @lombok.Setter() int i;
- @lombok.Setter() int j;
- public @Deprecated @java.lang.SuppressWarnings("all") void setI(final int i) {
- this.i = i;
- }
- public @java.lang.Deprecated @java.lang.SuppressWarnings("all") void setJ(final int j) {
- this.j = j;
- }
- SetterOnMethod() {
- super();
- }
-}
-@lombok.Setter() class SetterOnClassOnMethod {
- int i;
- int j;
- public @java.lang.SuppressWarnings("all") void setI(final int i) {
- this.i = i;
- }
- public @java.lang.SuppressWarnings("all") void setJ(final int j) {
- this.j = j;
- }
- SetterOnClassOnMethod() {
- super();
- }
-}
-@lombok.Setter() class SetterOnClassAndOnAField {
- int i;
- @lombok.Setter() int j;
- public @java.lang.Deprecated @java.lang.SuppressWarnings("all") void setJ(final int j) {
- this.j = j;
- }
- public @java.lang.SuppressWarnings("all") void setI(final int i) {
- this.i = i;
- }
- SetterOnClassAndOnAField() {
- super();
- }
-}
diff --git a/test/transform/resource/after-eclipse/SetterOnParam.java b/test/transform/resource/after-eclipse/SetterOnParam.java
deleted file mode 100644
index 3ec7f098..00000000
--- a/test/transform/resource/after-eclipse/SetterOnParam.java
+++ /dev/null
@@ -1,40 +0,0 @@
-import lombok.Setter;
-class SetterOnParam {
- @lombok.Setter() int i;
- @lombok.Setter() int j;
- public @java.lang.SuppressWarnings("all") void setI(final @SuppressWarnings("all") int i) {
- this.i = i;
- }
- public @java.lang.SuppressWarnings("all") void setJ(final @java.lang.SuppressWarnings("all") int j) {
- this.j = j;
- }
- SetterOnParam() {
- super();
- }
-}
-@lombok.Setter() class SetterOnClassOnParam {
- int i;
- int j;
- public @java.lang.SuppressWarnings("all") void setI(final int i) {
- this.i = i;
- }
- public @java.lang.SuppressWarnings("all") void setJ(final int j) {
- this.j = j;
- }
- SetterOnClassOnParam() {
- super();
- }
-}
-@lombok.Setter() class SetterOnClassAndOnAFieldParam {
- int i;
- @lombok.Setter() int j;
- public @java.lang.SuppressWarnings("all") void setJ(final @java.lang.SuppressWarnings("all") int j) {
- this.j = j;
- }
- public @java.lang.SuppressWarnings("all") void setI(final int i) {
- this.i = i;
- }
- SetterOnClassAndOnAFieldParam() {
- super();
- }
-}
diff --git a/test/transform/resource/after-eclipse/SetterOnParamAndOnMethod.java b/test/transform/resource/after-eclipse/SetterOnParamAndOnMethod.java
deleted file mode 100644
index 8d77fc67..00000000
--- a/test/transform/resource/after-eclipse/SetterOnParamAndOnMethod.java
+++ /dev/null
@@ -1,9 +0,0 @@
-class SetterOnParamAndOnMethod {
- @lombok.Setter() int i;
- public @Deprecated @java.lang.SuppressWarnings("all") void setI(final @SuppressWarnings("all") int i) {
- this.i = i;
- }
- SetterOnParamAndOnMethod() {
- super();
- }
-}
diff --git a/test/transform/resource/before/Constructors.java b/test/transform/resource/before/Constructors.java
index f5b5b770..bb39490a 100644
--- a/test/transform/resource/before/Constructors.java
+++ b/test/transform/resource/before/Constructors.java
@@ -2,27 +2,18 @@
final int x;
String name;
}
-
@lombok.RequiredArgsConstructor(access=lombok.AccessLevel.PROTECTED) class RequiredArgsConstructorAccess {
final int x;
String name;
}
-
@lombok.RequiredArgsConstructor(staticName="staticname") class RequiredArgsConstructorStaticName {
final int x;
String name;
}
-
-@lombok.RequiredArgsConstructor(onConstructor=@Deprecated) class RequiredArgsConstructorWithAnnotations {
- final int x;
- String name;
-}
-
@lombok.AllArgsConstructor class AllArgsConstructor1 {
final int x;
String name;
}
-
@lombok.NoArgsConstructor class NoArgsConstructor1 {
final int x;
String name;
diff --git a/test/transform/resource/before/GetterOnMethod.java b/test/transform/resource/before/GetterOnMethod.java
deleted file mode 100644
index 38b498de..00000000
--- a/test/transform/resource/before/GetterOnMethod.java
+++ /dev/null
@@ -1,15 +0,0 @@
-import lombok.Getter;
-class GetterOnMethod {
- @lombok.Getter(onMethod=@Deprecated) int i;
- @lombok.Getter(onMethod={@java.lang.Deprecated}) int j;
-}
-@lombok.Getter(onMethod=@Deprecated)
-class GetterOnClassOnMethod {
- int i;
- int j;
-}
-@lombok.Getter(onMethod=@Deprecated)
-class GetterOnClassAndOnAField {
- int i;
- @lombok.Getter(onMethod={@java.lang.Deprecated}) int j;
-}
diff --git a/test/transform/resource/before/SetterOnMethod.java b/test/transform/resource/before/SetterOnMethod.java
deleted file mode 100644
index d680b34b..00000000
--- a/test/transform/resource/before/SetterOnMethod.java
+++ /dev/null
@@ -1,15 +0,0 @@
-import lombok.Setter;
-class SetterOnMethod {
- @lombok.Setter(onMethod=@Deprecated) int i;
- @lombok.Setter(onMethod={@java.lang.Deprecated}) int j;
-}
-@lombok.Setter(onMethod=@Deprecated)
-class SetterOnClassOnMethod {
- int i;
- int j;
-}
-@lombok.Setter(onMethod=@Deprecated)
-class SetterOnClassAndOnAField {
- int i;
- @lombok.Setter(onMethod={@java.lang.Deprecated}) int j;
-}
diff --git a/test/transform/resource/before/SetterOnParam.java b/test/transform/resource/before/SetterOnParam.java
deleted file mode 100644
index 12b90696..00000000
--- a/test/transform/resource/before/SetterOnParam.java
+++ /dev/null
@@ -1,15 +0,0 @@
-import lombok.Setter;
-class SetterOnParam {
- @lombok.Setter(onParam=@SuppressWarnings("all")) int i;
- @lombok.Setter(onParam={@java.lang.SuppressWarnings("all")}) int j;
-}
-@lombok.Setter(onParam=@SuppressWarnings("all"))
-class SetterOnClassOnParam {
- int i;
- int j;
-}
-@lombok.Setter(onParam=@SuppressWarnings("all"))
-class SetterOnClassAndOnAFieldParam {
- int i;
- @lombok.Setter(onParam={@java.lang.SuppressWarnings("all")}) int j;
-}
diff --git a/test/transform/resource/before/SetterOnParamAndOnMethod.java b/test/transform/resource/before/SetterOnParamAndOnMethod.java
deleted file mode 100644
index b223fea8..00000000
--- a/test/transform/resource/before/SetterOnParamAndOnMethod.java
+++ /dev/null
@@ -1,3 +0,0 @@
-class SetterOnParamAndOnMethod {
- @lombok.Setter(onMethod=@Deprecated,onParam=@SuppressWarnings("all")) int i;
-}
diff --git a/test/transform/resource/messages-delombok/Constructors.java.messages b/test/transform/resource/messages-delombok/Constructors.java.messages
deleted file mode 100644
index 0ab86ac6..00000000
--- a/test/transform/resource/messages-delombok/Constructors.java.messages
+++ /dev/null
@@ -1,3 +0,0 @@
-16:48 ERROR incompatible types
-found : java.lang.Deprecated
-required: lombok.RequiredArgsConstructor.AnyAnnotation \ No newline at end of file
diff --git a/usage_examples/onXExample_post.jpage b/usage_examples/onXExample_post.jpage
deleted file mode 100644
index 85e3c58f..00000000
--- a/usage_examples/onXExample_post.jpage
+++ /dev/null
@@ -1,42 +0,0 @@
-import com.google.inject.Inject;
-import lombok.Getter;
-import lombok.RequiredArgsConstructor;
-import lombok.Setter;
-import org.hibernate.validator.Min;
-
-public class OnMethodOnParamExample {
- private int bananas;
- private int radishes;
-
- @Deprecated
- public int getBananas() {
- return bananas;
- }
-
- @Min(10)
- public int setRadishes(int radishes) {
- this.radishes = radishes;
- }
-
- @Override public String toString() {
- return String.format("I have %d bananas and %d beautiful radishes", bananas, radishes);
- }
-}
-
-class OnConstructorExample {
- private final Fireman fireman;
- private int fires = 10;
-
- @Inject
- public OnConstructorExample(Fireman fireman) {
- this.fireman = fireman;
- }
-
- public void setFires(@SuppressWarnings("all") int fires) {
- this.fires = fires;
- }
-
- @Override public String toString() {
- return String.format("Fireman: %s has %d fires", fireman, fires);
- }
-} \ No newline at end of file
diff --git a/usage_examples/onXExample_pre.jpage b/usage_examples/onXExample_pre.jpage
deleted file mode 100644
index 1bab3835..00000000
--- a/usage_examples/onXExample_pre.jpage
+++ /dev/null
@@ -1,24 +0,0 @@
-import com.google.inject.Inject;
-import lombok.Getter;
-import lombok.RequiredArgsConstructor;
-import lombok.Setter;
-import org.hibernate.validator.Min;
-
-public class OnMethodOnParamExample {
- @Getter(onMethod=@Deprecated) private int bananas;
- @Setter(onMethod=@Min(10)) private int radishes;
-
- @Override public String toString() {
- return String.format("I have %d bananas and %d beautiful radishes", bananas, radishes);
- }
-}
-
-@RequiredArgsConstructor(onConstructor=@Inject)
-class OnConstructorExample {
- private final Fireman fireman;
- @Setter(onParam=@SuppressWarnings("all")) private int fires = 10;
-
- @Override public String toString() {
- return String.format("Fireman: %s has %d fires", fireman, fires);
- }
-} \ No newline at end of file
diff --git a/website/download.html b/website/download.html
index 32f8fb7a..8f5887cf 100644
--- a/website/download.html
+++ b/website/download.html
@@ -47,8 +47,11 @@
<tr><td class="platform">Maven or Ivy</td>
<td class="instruction">Lombok is in maven central. <a href="mavenrepo/index.html">More&hellip;</a></td></tr>
- <tr><td class="platform">Javac and netbeans</td>
- <td class="instruction">Just put <code>lombok.jar</code> on the classpath. <span style="font-size: 0.8em;">Note that <a href="features/val.html"><em>val</em></a> does not work in Netbeans (yet).</span></td></tr>
+ <tr><td class="platform">Javac</td>
+ <td class="instruction">Just put <code>lombok.jar</code> on the classpath.</td></tr>
+
+ <tr><td class="platform">NetBeans</td>
+ <td class="instruction">Just put <code>lombok.jar</code> on the classpath and enable annotation processing. <a href="setup/netbeans.html">More&hellip;</a></td></tr>
<tr><td class="platform">Eclipse and STS</td>
<td class="instruction">Run <code>lombok.jar</code> as a java app (i.e. doubleclick it, usually) to open the installer.</td></tr>
diff --git a/website/features/Delegate.html b/website/features/Delegate.html
index 7825359f..de67b7b6 100644
--- a/website/features/Delegate.html
+++ b/website/features/Delegate.html
@@ -62,7 +62,7 @@
<div>
</div>
<div class="footer">
- <a href="index.html">Back to features</a> | <a href="val.html">Previous feature (val)</a> | <a href="onX.html">Next feature (onMethod=,onParameter=,onConstructor=)</a><br />
+ <a href="index.html">Back to features</a> | <a href="val.html">Previous feature (val)</a> | <span class="disabled">Next feature</span><br />
<a href="../credits.html" class="creditsLink">credits</a> | <span class="copyright">Copyright &copy; 2010-2011 Reinier Zwitserloot, Roel Spilker and Robbert Jan Grootjans, licensed under the <a href="http://www.opensource.org/licenses/mit-license.php">MIT license</a>.</span>
</div>
<div style="clear: both;"></div>
diff --git a/website/features/index.html b/website/features/index.html
index 04b6ed1c..3f00c81a 100644
--- a/website/features/index.html
+++ b/website/features/index.html
@@ -38,8 +38,6 @@
<dd>Finally! Hassle-free final local variables.</dd>
<dt><a href="Delegate.html"><code>@Delegate</code></a></dt>
<dd>Don't lose your composition.</dd>
- <dt><a href="onX.html"><code>onMethod=,onParam=,onConstructor=</code></a></dt>
- <dd>Annotate this! Add you favorite annotation to methods generated by lombok.</dd>
</dl>
</div>
<div class="pointer">
diff --git a/website/features/onX.html b/website/features/onX.html
deleted file mode 100644
index b94dea4b..00000000
--- a/website/features/onX.html
+++ /dev/null
@@ -1,58 +0,0 @@
-<!DOCTYPE html>
-<html><head>
- <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
- <link rel="stylesheet" type="text/css" href="../logi/reset.css" />
- <link rel="stylesheet" type="text/css" href="features.css" />
- <link rel="shortcut icon" href="../favicon.ico" type="image/x-icon" />
- <meta name="description" content="Spice up your java" />
- <title>onMethod=,onParam=,onConstructor=</title>
-</head><body><div id="pepper">
- <div class="minimumHeight"></div>
- <div class="meat">
- <div class="header"><a href="../index.html">Project Lombok</a></div>
- <h1>onMethod=,onParam=,onConstructor=</h1>
- <div class="byline">Annotate this! Add you favorite annotation to methods generated by lombok.</div>
- <div class="overview">
- <h3>Overview</h3>
- <p>
- Lombok lets you add your favorite annotation to methods generated by <code>@Getter</code> and <code>@Setter</code> by using the attribute <code>onMethod</code>
- on the lombok annotation. You can specify annotations to the parameters of the method on <code>@Setter</code> with the attribute <code>onParameter</code>.
- You can add annotation to constructors generated by <code>@NoArgsConstructor, @RequiredArgsConstructor and @AllArgsConstructor</code> by using the attribute
- <code>onConstructor</code>
- </p>
- </div>
- <div class="snippets">
- <div class="pre">
- <h3>With Lombok</h3>
- <div class="snippet">@HTML_PRE@</div>
- </div>
- <div class="sep"></div>
- <div class="post">
- <h3>Vanilla Java</h3>
- <div class="snippet">@HTML_POST@</div>
- </div>
- </div>
- <div style="clear: left;"></div>
- <div class="overview">
- <h3>Small print</h3><div class="smallprint">
- When the @Getter or @Setter annotation is placed on the type in stead of a field, using the attribute is not supported and it will result in a warning.
- </div>
- </div>
- <div class="footer">
- <a href="index.html">Back to features</a> | <a href="Delegate.html">Previous feature (@Delegate)</a> | <span class="disabled">Next feature</span><br />
- <a href="../credits.html" class="creditsLink">credits</a> | <span class="copyright">Copyright &copy; 2011 Reinier Zwitserloot, Roel Spilker and Robbert Jan Grootjans, licensed under the <a href="http://www.opensource.org/licenses/mit-license.php">MIT license</a>.</span>
- </div>
- <div style="clear: both;"></div>
- </div>
-</div>
-<script type="text/javascript">
- var gaJsHost = (("https:" == document.location.protocol) ? "https://ssl." : "http://www.");
- document.write(unescape("%3Cscript src='" + gaJsHost + "google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E"));
-</script>
-<script type="text/javascript">
- try {
- var pageTracker = _gat._getTracker("UA-9884254-1");
- pageTracker._trackPageview();
- } catch(err) {}
-</script>
-</body></html>
diff --git a/website/setup/netbeans-enable-annotation-processing-in-editor.png b/website/setup/netbeans-enable-annotation-processing-in-editor.png
new file mode 100644
index 00000000..d8a6b4c3
--- /dev/null
+++ b/website/setup/netbeans-enable-annotation-processing-in-editor.png
Binary files differ
diff --git a/website/setup/netbeans.html b/website/setup/netbeans.html
new file mode 100644
index 00000000..a828fc9f
--- /dev/null
+++ b/website/setup/netbeans.html
@@ -0,0 +1,65 @@
+<!DOCTYPE html>
+<html><head>
+ <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
+ <script src="../logi/jQuery-all.js" type="text/javascript"></script>
+ <link rel="stylesheet" type="text/css" href="../logi/reset.css" />
+ <link rel="stylesheet" type="text/css" href="../index.css" />
+ <link rel="shortcut icon" href="../favicon.ico" type="image/x-icon" />
+ <meta name="description" content="Spice up your java" />
+ <title>Project Lombok</title>
+ <!--[if lt IE 7]><script type="text/javascript" src="../logi/iepngfix_tilebg.js"></script><![endif]-->
+</head><body>
+ <a id="forkMe" href="http://github.com/rzwitserloot/lombok"><img style="position: absolute; top: 0; right: 0; border: 0;" src="http://s3.amazonaws.com/github/ribbons/forkme_right_darkblue_121621.png" alt="Fork me on GitHub" /></a>
+ <div class="meat">
+ <h1><a href="/">Project Lombok</a> - NetBeans instructions</h1>
+ <div id="buttonBar" class="buttonBar">
+ <a class="button" href="../features/index.html">
+ <img src="../icon_overview.png" />
+ <span>Feature Overview</span>
+ </a>
+ <a class="button" href="http://groups.google.com/group/project-lombok">
+ <img src="../icon_discussion.png" />
+ <span>Discuss / Help</span>
+ </a>
+ <a class="button" href="http://wiki.github.com/rzwitserloot/lombok/contributing">
+ <img src="../icon_contribute.png" />
+ <span>Contribute</span>
+ </a>
+ <a class="button" href="http://code.google.com/p/projectlombok/issues/list">
+ <img src="../icon_bugs.png" />
+ <span>Report an issue</span>
+ </a>
+ <div class="downloadContainer">
+ <a class="downloadLink" id="downloadLink" href="../download.html">
+ <img src="../icon_download.png" />
+ <span>Download!</span>
+ </a>
+ <div class="versionInfo">
+ Version: @VERSION@ | <a href="../changelog.html">changelog</a>
+ </div>
+ </div>
+ </div>
+ <div class="downloadHelp">
+ <ol>
+ <li>Add <code>lombok.jar</code> to the Project Libraries.</li>
+ <li>In the Project Properties, in the section Build &ndash; Compiling, check the &#39;Enable Annotation Processing in Editor&#39; checkbox.</li>
+ </ol>
+ <img src="netbeans-enable-annotation-processing-in-editor.png" />
+ </div>
+ <div class="endBar">
+ </div>
+ <div class="footer">
+ <a href="../credits.html" class="creditsLink">credits</a> | Copyright &copy; 2009-2011 Reinier Zwitserloot, Roel Spilker, and Robbert Jan Grootjans, licensed under the <a href="http://www.opensource.org/licenses/mit-license.php">MIT license</a>.
+ </div>
+ </div>
+ <script type="text/javascript">
+ var gaJsHost = (("https:" == document.location.protocol) ? "https://ssl." : "http://www.");
+ document.write(unescape("%3Cscript src='" + gaJsHost + "google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E"));
+ </script>
+ <script type="text/javascript">
+ try {
+ var pageTracker = _gat._getTracker("UA-9884254-1");
+ pageTracker._trackPageview();
+ } catch(err) {}
+ </script>
+</body></html>