Annotation Type AutoValue


  • @Retention(CLASS)
    @Target(TYPE)
    public @interface AutoValue
    Specifies that AutoValue should generate an implementation class for the annotated abstract class, implementing the standard 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();
       }
    Author:
    Éamonn McManus, Kevin Bourrillion
    See Also:
    AutoValue User's Guide