Maintenance ๏ Only jar & class files, not dex ๏ Jack n’Jill ? —> No one knows about Jayce ๏ Modifications are invisible BYTECODE WEAVING ✓ Simple to use ✓ No boiler plate code ✓ As easy as a gradle plugin ✓ Extremely powerful ✓ ‘de facto standard’ API : Javassist.
represent Java statements, they are used internally by Java compilers. Lombok for Java : projectlombok.org Hrisey for Android : github.com/mg6maciej/hrisey
focus on Javac) ๏ Jack n’Jill ? —> No one knows about Jayce ๏ Modifications are invisible ✓ Simple to use ✓ No boiler plate code ✓ As easy as a gradle plugin ✓ Extremely powerful AST MANIPULATION
new code can be generated ๏ Every lib based on reflection has to be rewritten ๏ Needs boiler plate to invoke generated code ✓ Simple to use ✓ Java Standard ✓ Relatively powerful ANNOTATION PROCESSING
with reflection & fill these data structures during annotation processing time . 2. Generate code so that RNЯ becomes available at runtime. 3. Generate code that allows modification of members (access fields, invoke methods and constructors).
use the reflection API. We manipulate fields, methods, constructors & classes… before they are compiled ! Unification of Annotation Processing and Reflection API By itself it is an important theoretical achievement in Java.
reflection API classes • RNЯ classes are filled during annotation processing • RNЯ classes are generated to become accessible at runtime via Class.forName(‘’test.Foo‘’)
to libs/apps at runtime • provide read-only access to reflection information • are faster than reflection on Android. But they are read-only, unlike native reflection.
RNЯ reflection classes : • accessible to libs/apps at runtime • provide read/write access to reflection information • are faster than reflection on Android. (Oh, Btw, there is a little detail that we gently omitted : annotation implementations…And we are proud to have succeeded in doing it.)
lot of reflection, many if not all features of reflection —>The fork introduced a high volume of changes… and potential bugs. • Reflection is also linked to the compiler at a very low level via class symbolication / class literals : Reflection Compiler Symbole
changes in Guice to use RNЯ. Bypass native reflection for members access via reflectors. And only that. Guice RNЯ Guice scan classes members Processing access field invoke methods create instances
at compile-time. RNЯ - Step 2 and Step 3 are a generalization of all the work that has been done on Android related to Annotation Processing to circumvent Reflection. RNЯ demonstrates that this approach is feasible.