public class DecoratedObjectFactory extends Object implements 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 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(Class<T> clazz) |
<T> T |
decorate(T obj) |
void |
destroy(Object obj) |
List<Decorator> |
getDecorators() |
Iterator<Decorator> |
iterator() |
boolean |
removeDecorator(Decorator decorator) |
void |
setDecorators(List<? extends Decorator> decorators) |
String |
toString() |
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
forEach, spliterator
public static final String ATTR
public void addDecorator(Decorator decorator)
public boolean removeDecorator(Decorator decorator)
public void clear()
public <T> T createInstance(Class<T> clazz) throws InstantiationException, IllegalAccessException, NoSuchMethodException, InvocationTargetException
public <T> T decorate(T obj)
public void destroy(Object obj)
Copyright © 2010 - 2020 Adobe. All Rights Reserved