These are chat archives for Arasthel/SwissKnife

21st
Jun 2015
Jorge Martin Espinosa
@Arasthel
Jun 21 2015 12:10
Do any of you know if this is possible? https://twitter.com/arasthel92/status/612591107906629632
I have a work around to allow inheritance between classes that have view or event injections, but it's really ugly and could slow down the compilation time
If this was possible, it would be a lot easier
Eugene Kamenev
@eugene-kamenev
Jun 21 2015 12:32
classNode.fields.findAll { it.hasAnnotation } smth like this
Or I missed smth
Jorge Martin Espinosa
@Arasthel
Jun 21 2015 12:37
That was the ugly workaround :smile:
When you have to do that for every field and method of every class which is a parent of X, checking if it has one of 14-16 annotations...
Eugene Kamenev
@eugene-kamenev
Jun 21 2015 13:50
Sounds like you need to have a challenge with groovy global AST transformation, not only local one
If you want to handle such thing
Jorge Martin Espinosa
@Arasthel
Jun 21 2015 19:14
Actually, what I did in the end was to check in runtime if the parent class responds to injectViews method and in that case, call it
I will be uploading a new version soon with some bugfixes on Parcelable and InjectView, as well as a new @FragmentArg annotation