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 was archived by the owner on Feb 26, 2023. It is now read-only.
Repository navigation
This repository was archived by the owner on Feb 26, 2023. It is now read-only.
This PR isn't intended to resolved this. The idea is just to have a common class between all generated classes. Also I need this for my current project :)
I just take a look at your fork. We have nearly the same implementation, but you can't handle fragment nor support fragment even if different classes because the project will not compile.
Constructors with fragment and support fragment have to be generated in each activity's/service's inner-builders according to the availability of these classes in the classpath.
Also, instead of retaining an instance of itself, the flags and extras methods could be implemented like below. You can then remove getThis method.
In my implementation I also added this constructor in every abstract builders :
public IntentBuilder(Context context, Intent intent) {
...
}
It may help in some cases.
And finally, I think you forgot to handle fragment's builders :) You may also add a common class (Builder) for every builders (fragment, activity, service). It should be an empty class but it could help. Mine looked like this :
I have to build a factory of application. So I use lots of generics and abstract classes :) I was struggling on builders because they haven't any common parent class.
Right now, there is no way to design an advanced application based on generated builders because there is no common classes between each of them.
I started working on a PR for this. The idea is to have the following structure :
This may also help to implement #883