blob: 0249053331f6449eb285717ed082a4858e48981b (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
|
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);
}
}
};
}
|