You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Feb 26, 2023. It is now read-only.
Expected:
This should be valid, because the upper bound of the type parameter is indeed a Parcel bean, and its subtypes should be Parcel beans as well.
Actual: AA adds a validation error, because it things it is not Parcel bean.
The text was updated successfully, but these errors were encountered:
@WonderCsabo, this is a little tricky. Parceler requires the bean in use to be annotated with @Parcel. Extending a bean that is annotated is not enough. I assume your end Fragment would have a concrete implementation to base your generated code on, would checking if a bean passes as a @Parcel annotated bean at that point be appropriate? In that case, I'd suggest looking at the WIP I have here johncarl81/transfuse@9933042 that can be used to resolve generic types to their concrete implementation declaration.
@johncarl81 thanks for your quick answer, and sorry for my delayed one. Unfortunately in my case, the generic field is annotated, where we do not yet know the actual subclasses. If there is no guarantee if a superclass is a Parcel, then all of its subclasses are parcels as well by some type of contract, i guess we cannot validate this. Maybe Parceler should enforce this in some way?
Correct me if I'm wrong, but in your example, there would be a concrete implementation that AA would use to generate the extension class, something like this:
This is a template, please adjust it accordingly to your specific issue.
You may also want to read our issue guide.
AndroidAnnotations version: 4.2.0
Android compile SDK version: 24
Annotated code:
Expected:
This should be valid, because the upper bound of the type parameter is indeed a Parcel bean, and its subtypes should be Parcel beans as well.
Actual: AA adds a validation error, because it things it is not Parcel bean.
The text was updated successfully, but these errors were encountered: