Skip to content

Consider using AutoValue for immutable value types. #418

Closed

Description

@aozarov

We should evaluate if using AutoValue is a good fit for us.

This will help to eliminate boilerplate code (though IDE's today typically help in the initial part and some
even in the maintenance part).

We should consider IDE support/behavior when the referred auto generated class is missing,
flexibility in copying set values (e.g. passed collection to immutable collection), replacing null with api-client Data.nullOf,..).

Also, it introduce the dependency of "@nullable" annotation and I think once users see that in the code they expect it in other places (so, we should go and change the code to use it consistently when applicable).

Activity

  1. garrettjonesgoogle commented on Jul 18, 2017

    @garrettjonesgoogle
    Contributor

    This is something we can consider opportunistically - we already use it a bit in gax-java. I don't think it's worth retaining an issue for it, though.

  2. added a commit that references this issue on Jan 22, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

type: cleanupAn internal cleanup or hygiene concern.

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions