Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This code has been reviewed and submitted internally. Feel free to discuss on the PR and we can submit follow-up changes as necessary.
Commits:
Don't compare TypeMirrors using Object#equals
They don't override Object#equals and are not interned, so reference
equality is not useful. This was causing unnecessary duplication of
Provider fields in AutoFactories.
d9c0593
Add an originating element for AutoFactory types
c148ee4
Make AutoFactory an isolating annotation processor in Gradle
RELNOTES=Gradle:
@AutoFactory
is now an isolating annotation processor0b58d04
Allow @AutoOneOf properties to be void.
An abstract void method means that the associated kind has no value. The factory method has no parameter and calling the implementation of the void method does nothing unless the instance is of another kind.
RELNOTES=Allow @AutoOneOf properties to be void.
d5e4f55
Improve the logic for setter type conversion. Setter type conversion is when for example we have a property `Optional foo()` or `ImmutableList bar()` and a setter like `setFoo(String x)` or `setBar(String[] x)`. The generated setter will need to do `Optional.of(x)` or `ImmutableList.copyOf(x)`.
Previously the logic to do this was split into two places: (a) where we determined whether a conversion was possible, and (b) where we generated the code. In (b) we had to guess the name of the copy method (
of
orcopyOf
for example) even though we knew it in (a). Now we arrange for the information about the method name to be copied from (a) to (b).This change will allow us to add logic to support ImmutableSortedSet.copyOfSorted and ImmutableSortedMap.copyOfSorted.
e0c631a
Better support for ImmutableSortedSet and ImmutableSortedMap. Use .copyOfSorted when setting from a SortedSet or SortedMap. Use .naturalOrder when constructing a builder.
Fixes #666.
RELNOTES=Use ImmutableSortedSet.copyOfSorted and .naturalOrder where appropriate.
7564c4c
Migrate Correspondence subclasses to instead call Correspondence.from.
6c9bd9f