|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjaxx.runtime.decorator.DecoratorProvider
public abstract class DecoratorProvider
A decorator provider.
Implements the methodloadDecorators() to fill the decorators availables.
Then can obtain decorator via the methods getDecorator(...)
User: chemit
Date: 28 oct. 2009
Time: 19:40:48
| Nested Class Summary | |
|---|---|
static class |
DecoratorProvider.DecoratorContext<T>
|
| Field Summary | |
|---|---|
protected List<DecoratorProvider.DecoratorContext<?>> |
decorators
Registred decorators. |
| Constructor Summary | |
|---|---|
DecoratorProvider()
|
|
| Method Summary | ||
|---|---|---|
void |
clear()
|
|
|
getDecorator(Class<O> type)
Obtain a decorator given a type. |
|
|
getDecorator(Class<O> type,
String name)
Obtain a decorator given a type and a extra name. |
|
|
getDecorator(O object)
Obtain a decorator for the given object. |
|
|
getDecorator(O object,
String name)
Obtain a decorator given a object and an extra name to qualify the context. |
|
protected
|
getDecoratorContext(Class<T> type,
String context)
|
|
protected List<DecoratorProvider.DecoratorContext<?>> |
getDecorators()
|
|
protected abstract void |
loadDecorators()
Load all decorators of the provider |
|
protected void |
registerDecorator(Decorator<?> decorator)
|
|
protected
|
registerDecorator(String context,
Decorator<T> decorator)
Register a new decorator in the cache of the provider. |
|
protected void |
registerJXPathDecorator(Class<?> klass,
String expression)
|
|
protected void |
registerJXPathDecorator(Class<?> klass,
String name,
String expression)
|
|
protected void |
registerMultiJXPathDecorator(Class<?> klass,
String expression,
String separator,
String separatorReplacement)
|
|
protected void |
registerMultiJXPathDecorator(Class<?> klass,
String name,
String expression,
String separator,
String separatorReplacement)
|
|
protected void |
registerPropertyDecorator(Class<?> klass,
String expression)
|
|
protected void |
registerPropertyDecorator(Class<?> klass,
String name,
String expression)
|
|
void |
reload()
|
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected List<DecoratorProvider.DecoratorContext<?>> decorators
| Constructor Detail |
|---|
public DecoratorProvider()
| Method Detail |
|---|
protected abstract void loadDecorators()
public <O> Decorator<O> getDecorator(O object)
O - object of decorated objectobject - object of decorated object
null if not found
public <O> Decorator<O> getDecorator(O object,
String name)
O - object of decorated objectobject - object of decorated objectname - extra name to qualify the decorator to use
null if not foundpublic <O> Decorator<O> getDecorator(Class<O> type)
O - type of decorated objecttype - type of decorated object
null if not found
public <O> Decorator<O> getDecorator(Class<O> type,
String name)
O - type of decorated objecttype - type of decorated objectname - extra name to qualify the decorator to use
null if not foundpublic void reload()
public void clear()
protected void registerPropertyDecorator(Class<?> klass,
String expression)
protected void registerJXPathDecorator(Class<?> klass,
String expression)
protected void registerMultiJXPathDecorator(Class<?> klass,
String expression,
String separator,
String separatorReplacement)
protected void registerPropertyDecorator(Class<?> klass,
String name,
String expression)
protected void registerJXPathDecorator(Class<?> klass,
String name,
String expression)
protected void registerMultiJXPathDecorator(Class<?> klass,
String name,
String expression,
String separator,
String separatorReplacement)
protected void registerDecorator(Decorator<?> decorator)
protected <T> void registerDecorator(String context,
Decorator<T> decorator)
T - type of data decoratedcontext - the name decoratordecorator - the decorator to registerprotected List<DecoratorProvider.DecoratorContext<?>> getDecorators()
protected <T> DecoratorProvider.DecoratorContext<T> getDecoratorContext(Class<T> type,
String context)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||