Merge branch 'master' of git@github.com:rzwitserloot/lombok

This commit is contained in:
Reinier Zwitserloot committed 2009-07-18 02:53:11 +02:00
commit b7c9697899
4 files changed
+4 -4

No files matched your search

+1 -1
View File
@@ -119,7 +119,7 @@ public class HandleData implements EclipseAnnotationHandler<Data> {
if ( (fieldDecl.modifiers & ClassFileConstants.AccTransient) == 0 ) nodesForEquality.add(child);
boolean isFinal = (fieldDecl.modifiers & ClassFileConstants.AccFinal) != 0;
nodesForToString.add(child);
if ( isFinal ) nodesForConstructor.add(child);
if ( isFinal && fieldDecl.initialization == null ) nodesForConstructor.add(child);
new HandleGetter().generateGetterForField(child, annotationNode.get());
if ( !isFinal ) new HandleSetter().generateSetterForField(child, annotationNode.get());
}
+1 -1
View File
@@ -87,7 +87,7 @@ public class HandleData implements JavacAnnotationHandler<Data> {
if ( (fieldFlags & Flags.TRANSIENT) == 0 ) nodesForEquality = nodesForEquality.append(child);
boolean isFinal = (fieldFlags & Flags.FINAL) != 0;
nodesForToString = nodesForToString.append(child);
if ( isFinal ) nodesForConstructor = nodesForConstructor.append(child);
if ( isFinal && fieldDecl.init == null ) nodesForConstructor = nodesForConstructor.append(child);
new HandleGetter().generateGetterForField(child, annotationNode.get());
if ( !isFinal ) new HandleSetter().generateSetterForField(child, annotationNode.get());
}
@@ -3,7 +3,7 @@ public class GetterSetterExample {
private String name;
@Override public String toString() {
return String.format("%s (age: %d)", age, name);
return String.format("%s (age: %d)", name, age);
}
public int getAge() {
+1 -1
View File
@@ -7,6 +7,6 @@ public class GetterSetterExample {
private @Setter(AccessLevel.PROTECTED) String name;
@Override public String toString() {
return String.format("%s (age: %d)", age, name);
return String.format("%s (age: %d)", name, age);
}
}