Allow protected fields to be used as arguments
See original GitHub issueFor example when we write in our fragment something like this:
@Arg
protected String protectedArg;
We’ll get an error:
Error:(6, 22) error: The @Arg annotated field ‘protectedArg’ in class ClassWithProtectedField has private or protected visibility…
I wonder why protected
fields can’t be used as arguments. FragmentBuilder#injectArguments
can access them because FragmentBuilder
is in the same package as Fragment
. I’ve created a test in https://github.com/pamalyshev/fragmentargs/commit/05350b0a472f381648af56647122edf84baa88cc
Issue Analytics
- State:
- Created 7 years ago
- Comments:6 (4 by maintainers)
Top Results From Across the Web
Private and protected properties and methods
To hide an internal interface we use either protected or private properties: Protected fields start with _ . That's a well-known convention, ...
Read more >Java : Accessor methods vs protected fields - Stack Overflow
When you only define methods to access a field, you are restricted by the methods. You cannot do something that there is not...
Read more >Why is Clean Code suggesting avoiding protected variables?
You created a public property with protected setter. The protected field should be solved with a protected property with private setter. +1 now....
Read more >Protected variable in Python - GeeksforGeeks
Protected variables are those data members of a class that can be accessed within the class and the classes derived from that class....
Read more >VisibilityModifierCheck (checkstyle 10.5.0 API)
Checks whether variable has static final modifiers. Setter to allow final fields to be declared as public. Setter to allow immutable fields to...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Yes, I will add support for that
Awesome, thanks!