Patent attributes
Improved compilers recognize interception declarations in source code, and emit code that replaces invocations of specified artifacts with invocations of specified interceptors instead. Source generators proactively modify program behavior in arbitrary desired ways without introducing hidden security violations and without requiring edits by the program's developers. Interception declarations are visible in source code and development tools. In some cases, different invocations of a particular method at respective locations are intercepted by different replacement methods. Replacement methods have identical signatures, or are otherwise compatible. Some interceptors specify optional parameters. Method calls, field accesses, and property calls may be intercepted. Work to modify program behavior is moved in the program lifecycle from runtime to compile time, thus improving runtime performance and eliminating JIT compilation security risks.