public static InterceptorProcessor createInterceptorProcessor()

in bytekit-core/src/main/java/com/alibaba/bytekit/asm/interceptor/annotation/InterceptorParserUtils.java [23:56]


    public static InterceptorProcessor createInterceptorProcessor(Method method, LocationMatcher locationMatcher,
            boolean inline, Class<? extends Throwable> suppress, Class<?> suppressHandler) {

        InterceptorProcessor interceptorProcessor = new InterceptorProcessor(
                method.getDeclaringClass().getClassLoader());

        // locationMatcher
        interceptorProcessor.setLocationMatcher(locationMatcher);

        // interceptorMethodConfig
        InterceptorMethodConfig interceptorMethodConfig = new InterceptorMethodConfig();
        interceptorProcessor.setInterceptorMethodConfig(interceptorMethodConfig);
        interceptorMethodConfig.setOwner(Type.getInternalName(method.getDeclaringClass()));
        interceptorMethodConfig.setMethodName(method.getName());
        interceptorMethodConfig.setMethodDesc(Type.getMethodDescriptor(method));

        // inline
        interceptorMethodConfig.setInline(inline);

        // bindings
        List<Binding> bindings = BindingParserUtils.parseBindings(method);
        interceptorMethodConfig.setBindings(bindings);

        // errorHandlerMethodConfig
        if (suppress != null) {
            InterceptorMethodConfig errorHandlerMethodConfig = ExceptionHandlerUtils.errorHandlerMethodConfig(suppress,
                    suppressHandler);
            if (errorHandlerMethodConfig != null) {
                interceptorProcessor.setExceptionHandlerConfig(errorHandlerMethodConfig);
            }
        }

        return interceptorProcessor;
    }