I can parcel some models using Parceler like this:
@Parcel(Serialization.BEAN)
public class PasswordSetModel {
private String mPassword;
private String mRepetition;
/* Getter & Setter */
...
But if this class is part of another class, the mechanism does not work. I am getting an NPE for mPasswordSetModel. Creating an instance in an constructor did not work, because the members mPassword and mRepetition were null after unparcelling.
@Parcel
public class RegistrationModel {
private PasswordSetModel mPasswordSetModel;
/* Getter & Setter */
...
So how can I parcel this using Parceler?
okay, the problem was that I uses "wrong" setter methods. In order to use fluent interface style I made it this way:
It seems that the setters were now found and therefor the model was NULL