Builder toBuilder() function is included in the constructor for the auto generated parcel code.
Error:(128, 14) error: no suitable constructor found for AutoValue_TestSection(String,List<QuoteGroup>,Integer)
constructor AutoValue_TestSection.AutoValue_TestSection(String,List<QuoteGroup>,Integer,Builder) is not applicable
(actual and formal argument lists differ in length)
constructor AutoValue_TestSection.AutoValue_TestSection(Parcel) is not applicable
(actual and formal argument lists differ in length)
Example class.
@AutoValue @AutoGson public abstract class TestSection implements Parcelable, Comparable<TestSection> {
public abstract String name();
public abstract List<QuoteGroup> quoteGroups();
public abstract Integer id();
public abstract Builder toBuilder();
@Override public int compareTo(@NonNull TestSection testSection) {
return id().compareTo(testSection.id());
}
@AutoValue.Builder public abstract static class Builder {
public abstract Builder name(String name);
public abstract Builder quoteGroups(List<QuoteGroup> quoteGroups);
public abstract Builder id(Integer id);
public abstract TestSection build();
}
}
Builder toBuilder() function is included in the constructor for the auto generated parcel code.
Example class.