Files
lombok/test/transform/resource/after-delombok/WithInAnonymousClass.java
T
Rawi01 60f575496b [fixes #2838] Handle anonymous classes properly
Generated qualified names (e.g. Outer.Inner) now stop at anonymous
classes instead of adding an empty part. All handlers that add static
fields/methods/types now add error messages instead of generating
invalid code.
2021-06-03 19:23:19 +02:00

20 lines
462 B
Java

public class WithInAnonymousClass {
Object annonymous = new Object() {
class Inner {
private Inner(String string) {
}
private String string;
/**
* @return a clone of this object, except with this updated property (returns {@code this} if an identical value is passed).
*/
@java.lang.SuppressWarnings("all")
public Inner withString(final String string) {
return this.string == string ? this : new Inner(string);
}
}
};
}