public InterceptorMethodHandler(Object target, Class<?> targetClass, List<InterceptionModel<Class<?>, ?>> interceptionModels, List<InterceptionHandlerFactory<?>> interceptionHandlerFactories, InterceptorMetadata targetClassMetadata) { super(target, targetClass != null ? targetClass : target.getClass()); if (interceptionModels == null) { throw new IllegalArgumentException("Interception model must not be null"); } if (interceptionHandlerFactories == null) { throw new IllegalArgumentException("Interception handler factory must not be null"); } if (interceptionModels.size() != interceptionHandlerFactories.size()) { throw new IllegalArgumentException("For each interception model, an interception factory must be provided"); } this.interceptionModels = interceptionModels; for (int i = 0; i < interceptionModels.size(); i++) { for (Object interceptorReference : this.interceptionModels.get(i).getAllInterceptors()) { interceptorHandlerInstances.put(interceptorReference, ((InterceptionHandlerFactory) interceptionHandlerFactories.get(i)).createFor((Object) interceptorReference)); } } targetClassInterceptorMetadata = targetClassMetadata; }