-
Notifications
You must be signed in to change notification settings - Fork 274
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
No corresponding property found for constructor parameter nodes #38
Comments
Parceler supports all modifiers, including package private (FYI, regular-private is discouraged as it uses reflection). What version are you using? Are you using |
I'm using Works:
Doesn't work:
Can package private be supported without using reflection? |
Yes, package private should be supported without reflection. Let me investigate a bit... |
That would be awesome! thanks |
@tom91136, Finally got to the bottom of this. Are you seeing this NPE also?:
Remembering the thoughts behind This is a problem in the library, however. I'm thinking that 1. this should be flagged as an error, because Parceler cannot find a valid getter and 2. Should be overrideable with an annotation, so this should work: @Parcel(Parcel.Serialization.METHOD)
public class NavigationPath {
private final HashMap<String, Bundle> nodes;
@ParcelConstructor
NavigationPath(HashMap<String, Bundle> nodes) {
this.nodes = nodes;
}
@ParcelProperty("nodes")
HashMap<String, Bundle> getNodes() {
return nodes;
}
} Thoughts? |
Yes that's the exact stacktrace I got |
Works great! thanks |
I want to make my data immutable so this is what I did:
Notice that the constructor and getter for node is package private.
This exception is thrown when compiling:
If I make the methods/constructors public, then I loose immutability.
Can you make parceler support at least package private visibility?
Butterknife does that without problems so I assume this can be done?
The text was updated successfully, but these errors were encountered: