throws InterceptionException {
boolean accepts;
try {
accepts = getAcceptor().accepts(method);
} catch (NullPointerException e) {
throw new InterceptionException("StaticInterceptors should not use constructor parameters inside the accepts method", e);
}
if (accepts) {
Interceptor interceptor = container.instanceFor(type);
if (interceptor == null) {
throw new InterceptionException("Unable to instantiate interceptor for " + type.getName()
+ ": the container returned null.");
}
logger.debug("Invoking interceptor {}", interceptor.getClass().getSimpleName());
interceptor.intercept(stack, method, resourceInstance);
} else {