mirror of
https://github.com/tiennm99/lombok.git
synced 2026-10-14 06:17:44 +00:00
Merge branch 'master' of git@github.com:rzwitserloot/lombok
This commit is contained in:
commit
b7c9697899
4 files changed
+4
-4
No files matched your search
@@ -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());
|
||||
}
|
||||
|
||||
@@ -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() {
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user