@Retention(value=CLASS)
@Target(value=TYPE)
public @interface AutoValue
Object
methods like equals
to have conventional value semantics. A
simple example:
@
AutoValue
abstract class Person {
static Person create(String name, int id) {
return new AutoValue_Person(name, id);
}
abstract String name();
abstract int id();
}
Copyright © 2021 Google LLC. All Rights Reserved.