by shortrounddev2 · 3y ago · 0 comments
[Proposal]: Interceptors #7009
> An interceptor is a method which can declaratively substitute a call to itself instead of a call to an interceptable method at compile time. This substitution occurs by having the interceptor declare the source locations of the calls that it intercepts. This provides a limited facility to change the semantics of existing code by adding new code to a compilation (e.g. in a source generator).
Sound like Spring AOP stuff without reading more
Without interceptors, source generators can only add new code, but cannot modify any existing code. Interceptors enable method call substitutions.