[Question] Why the generated constructor is protected rather than private?
kostovtd opened this issue · 1 comments
kostovtd commented
I'm a long-time user of this plugin for Android Studio. Great job!
Just a small question - in the official Android Documentation, the example of how the Parcelable interface should be used is slightly different than the generated code by your plugin.
In the official example, the POJO's constructor is private, while the one generated by your plugin is protected. Is there any specific reason for this?
Links:
Official Parcelable documentation
POJO with Parcelable code generated by your plugin
mcharmas commented
Yes, good question.
I think I’ve done it to allow inheritance of Parcelable objects.
Pozdrawiam,
Michał Charmas
dnia 27 kwietnia 2017 o 21:45:29, todorBG (notifications@github.com) napisał:
I'm a long-time user of this plugin for Android Studio. Great job!
Just a small question - in the official Android Documentation, the example of how the Parcelable interface should be used is slightly different than the generated code by your plugin.
In the official example, the POJO's constructor is private, while the one generated by your plugin is protected. Is there any specific reason for this?
Links:
Official Parcelable documentation
POJO with Parcelable code generated by your plugin
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub, or mute the thread.