isshoni-soft / winry

Isshoni Bootstrapper, uses introspection & code generation to streamline bootstrapping & general development
0 stars 0 forks source link

Create bytebuddy interface for safe bytecode manipulation between multiple processors #10

Closed Dragovorn closed 3 years ago

Dragovorn commented 3 years ago

ByteBuddy manipulation should be allowed by all annotation processors, the pre-requisite to this is to allow processors to safely edit potentially the same method. This should be done by adding a new step to all of the annotation processors with some way of providing 'advice' or direct changes to incoming bytebuddy operation on the associated class. Desired flow:

Dragovorn commented 3 years ago

A thought on method wrapping compatibility-- when producing wrapped methods it may be possible to generate a method interceptor at runtime and to use that to 'stitch' together multiple method interceptor classes in bytebuddy, the performance and memory impact of this will have to be scrutinized though.

Dragovorn commented 3 years ago

This might be possible by using a custom delegator engine that acts as a middleman, i.e. WinryDelegator, which then has delegators registered to it, which are then executed on delegation.