Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

'Update autovalue generated methods' does not generate Builder method properly #25

Open
igorwojda opened this issue Aug 17, 2017 · 0 comments

Comments

@igorwojda
Copy link

igorwojda commented Aug 17, 2017

setLastName method should be added after running 'Update autovalue generated methods', instead all methods are removed and only setLastName is added (running action the second time generates all method as before, but there is no Update autovalue generated methods)

package com.model;

import com.google.auto.value.AutoValue;
import com.google.gson.annotations.SerializedName;

import javax.annotation.Nullable;

@AutoValue
public abstract class PatientModel {

    @Nullable
    @SerializedName("id")
    public abstract String getId();

    @Nullable
    @SerializedName("first_name")
    public abstract String getFirstName();
    
    @Nullable
    @SerializedName("last_name")
    public abstract String getLastName();

    public static Builder builder() {
        return new AutoValue_PatientModel.Builder();
    }

    @AutoValue.Builder
    public abstract static class Builder {

        public abstract Builder setId(String newId);

        public abstract Builder setFirstName(String newFirstName);

        public abstract PatientModel build();
    }
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant