diff --git a/jetty-servlet/src/main/java/org/eclipse/jetty/servlet/BaseHolder.java b/jetty-servlet/src/main/java/org/eclipse/jetty/servlet/BaseHolder.java index 4a6a3609973a..046d9126b8c7 100644 --- a/jetty-servlet/src/main/java/org/eclipse/jetty/servlet/BaseHolder.java +++ b/jetty-servlet/src/main/java/org/eclipse/jetty/servlet/BaseHolder.java @@ -186,6 +186,15 @@ public synchronized boolean isInstance() return _instance != null; } + /** + * Wrap component using component specific Wrapper Function beans. + * + * @param component the component to optionally wrap + * @param wrapperFunctionType the bean class type to look for in the {@link ServletContextHandler} + * @param function the BiFunction to execute for each {@code wrapperFunctionType} Bean found (passing in the component and component type) + * @param the "wrapper function" implementation. (eg: {@code ServletHolder.WrapperFunction} or {@code FilterHolder.WrapperFunction}, etc) + * @return the component that has passed through all Wrapper Function beans found. + */ protected T wrap(final T component, final Class wrapperFunctionType, final BiFunction function) { T ret = component;