-
Sub-task
-
Resolution: Done
-
Major
-
2.12.0.Final
-
None
It would be good to have a command to generate a CDI interceptor. A simple command such as :
cdi-new-interceptor --named LoggingInterceptor ;
Would generate :
@Interceptor public class LoggingInterceptor { @AroundInvoke public Object logMethod(InvocationContext ic) throws Exception { try { return ic.proceed(); } finally { } } }
There could even have another parameter to add an existing interceptor binding
cdi-new-interceptor --named LoggingInterceptor --binding Loggable ;
Would add the Loggable interceptor binding to the class :
@Interceptor @Loggable public class LoggingInterceptor { @AroundInvoke public Object logMethod(InvocationContext ic) throws Exception { try { return ic.proceed(); } finally { } } }
- is related to
-
FORGE-2080 Being able to enable CDI interceptors and decorators
- Closed
- relates to
-
FORGE-2059 Being able to create a new CDI interceptor binding
- Closed