AutoValuePlugin

Additional

Language
Java
Version
N/A
Created
Dec 2, 2015
Updated
Jun 22, 2017 (Retired)
Owner
Andres Castano (afcastano)
Contributors
Eva (evant)
Bartek Lipinski (blipinsk)
Victor J Reventos (vjames19)
Ivan Soriano (guavabot)
Andres Castano (afcastano)
James Percy (jamespercy)
vedgautam
7
Activity
Badge
Generate
Download
Source code

AutoValuePlugin

Google AutoValue plugin for IntelliJ.


Prerequisites

IntelliJ should run using JRE 1.7 or higher. The JRE version is shown in the about dialog.

If you need to upgrade the JRE, follow this guide.


AutoValue is awesome. I can't explain it better than that, or that.

Contribute:

If you want to contribute, follow this guide.

Functionality:

  • Adds an @AutoValue.Builder static class inside the target @AutoValue class.
  • Searches for all abstract getters on the target class and transforms it into builder methods in the builder.
  • Creates a static builder method that returns the @AutoValue.Builder instance.
  • Optionally, generates the create factory method. See #11
  • If the builder exists, it will either add the missing properties to it or remove the ones that are not needed any more.
  • It also supports AutoParcel and AutoParceGson.

How to use:

The plugin adds new context menu actions, code generation actions and intention actions. The easiest way to use the plugin is to right-click inside a class annotated with @AutoValue and choose any of the generation options that appears first on the list.

There are also other ways of using the plugin. Here is a short tutorial video (1:25 mins):

https://www.youtube.com/watch?v=sMX9PT3ecu8

A big THANK YOU to these contributors: