public class DecoratedObjectFactory extends java.lang.Object implements java.lang.Iterable<Decorator>
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.
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
ATTR
ServletContext attribute for the active DecoratedObjectFactory
|
Constructor and Description |
---|
DecoratedObjectFactory() |
Modifier and Type | Method and Description |
---|---|
void |
addDecorator(Decorator decorator) |
void |
clear() |
<T> T |
createInstance(java.lang.Class<T> clazz) |
<T> T |
decorate(T obj) |
void |
destroy(java.lang.Object obj) |
java.util.List<Decorator> |
getDecorators() |
java.util.Iterator<Decorator> |
iterator() |
void |
setDecorators(java.util.List<? extends Decorator> decorators) |
java.lang.String |
toString() |
public static final java.lang.String ATTR
public void addDecorator(Decorator decorator)
public void clear()
public <T> T createInstance(java.lang.Class<T> clazz) throws java.lang.InstantiationException, java.lang.IllegalAccessException, java.lang.NoSuchMethodException, java.lang.reflect.InvocationTargetException
java.lang.InstantiationException
java.lang.IllegalAccessException
java.lang.NoSuchMethodException
java.lang.reflect.InvocationTargetException
public <T> T decorate(T obj)
public void destroy(java.lang.Object obj)
public java.util.List<Decorator> getDecorators()
public java.util.Iterator<Decorator> iterator()
iterator
in interface java.lang.Iterable<Decorator>
public void setDecorators(java.util.List<? extends Decorator> decorators)
public java.lang.String toString()
toString
in class java.lang.Object
Copyright © 1995–2023 Webtide. All rights reserved.