Closed Zhuinden closed 5 years ago
Can you even use @Parcelize data class
if you do that? I wouldn't want to lose its convenience.
Technically that can work only if you can pass in your ScopeKey & Parcelable
type as a generic argument instead of just regular ScopeKey.
So like,
interface ScopeKey.Child<T extends ScopeKey> {
List<T> getParentScopes();
}
as this way you can setup a List<Parcelable & ScopeKey>
. Tacky!
I think we'll just have to live with this one for now.
The trick is that in that case, parcellation of the ScopeKeys should also happen via
KeyParceler
, instead of parcelling it along with the key as a field like any other.It also seems a bit... trickier to set up scopes if you need to also customize parents.
This question comes up primarily if you need to pass in parameters into the parent scope, like an ID, and now you have to bundle it into a string, then at identification you'd need to construct it with said ID, and then you think of http://www.thecodelesscode.com/case/167