Package org.eclipse.jetty.util
Class DecoratedObjectFactory
java.lang.Object
org.eclipse.jetty.util.DecoratedObjectFactory
An ObjectFactory enhanced by
Decorator
instances.
Consistent single location for all Decorator behavior, with equal behavior in a ServletContext and also for a stand alone client.
Used by ServletContextHandler, WebAppContext, WebSocketServerFactory, and WebSocketClient.
Can be found in the ServletContext Attributes at the DecoratedObjectFactory.ATTR
key.
-
Field Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
addDecorator
(Decorator decorator) static void
associateInfo
(Object info) void
clear()
<T> T
createInstance
(Class<T> clazz) <T> T
decorate
(T obj) void
static void
static Object
iterator()
boolean
removeDecorator
(Decorator decorator) void
setDecorators
(List<? extends Decorator> decorators) toString()
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods inherited from interface java.lang.Iterable
forEach, spliterator
-
Field Details
-
ATTR
ServletContext attribute for the active DecoratedObjectFactory
-
-
Constructor Details
-
DecoratedObjectFactory
public DecoratedObjectFactory()
-
-
Method Details
-
associateInfo
-
disassociateInfo
public static void disassociateInfo() -
getAssociatedInfo
-
addDecorator
-
removeDecorator
-
clear
public void clear() -
createInstance
public <T> T createInstance(Class<T> clazz) throws InstantiationException, IllegalAccessException, NoSuchMethodException, InvocationTargetException -
decorate
public <T> T decorate(T obj) -
destroy
-
getDecorators
-
iterator
-
setDecorators
-
toString
-