• Home
  • Raw
  • Download

Lines Matching refs:AutoValue

1 # AutoValue  chapter
8 > "AutoValue is a great tool for eliminating the drudgery of writing mundane
31 AutoValue provides an easier way to create immutable value classes, with a lot
35 This page will walk you through how to use AutoValue. Looking for a little more
36 persuasion? Please see [Why AutoValue?](why.md).
38 ## <a name="howto"></a>How to use AutoValue
40 The AutoValue concept is extremely simple: **You write an abstract class, and
41 AutoValue implements it.** That is all there is to it; there is literally *no*
44 **Note:** Below, we will illustrate an AutoValue class *without* a generated
46 reading at [AutoValue with Builders](builders.md) instead.
51 for each desired property, and bearing the `@AutoValue` annotation.
54 import com.google.auto.value.AutoValue;
56 @AutoValue
70 **For a nested class**, see ["How do I use AutoValue with a nested class"](howto.md#nested).
95 Some AutoValue annotations have CLASS retention. This is mostly of use for
96 compile-time tools, such as AutoValue itself. If you are creating
97 a library, the end user rarely needs to know the original AutoValue annotations.
167 Your choice to use AutoValue is essentially *API-invisible*. This means that, to
190 AutoValue runs inside `javac` as a standard annotation processor. It reads your
208 For the `Animal` example shown above, here is [typical code AutoValue might
229 ## <a name="why"></a>Why should I use AutoValue?
231 See [Why AutoValue?](why.md).
235 AutoValue requires that your compiler be at least Java 8. However, the code that
244 * ... [use AutoValue with a **nested** class?](howto.md#nested)
250 * ... [have AutoValue implement a concrete or default
255 * ... [have AutoValue also implement abstract methods from my
257 * ... [use AutoValue with a **generic** class?](howto.md#generic)
259 * ... [use AutoValue to **implement** an **annotation**
266 * ... [have one `@AutoValue` class **extend** another?](howto.md#inherit)
270 * ... [use AutoValue on an **interface**, not abstract