Modifier and Type | Field and Description |
---|---|
static String |
GLOBAL_DECORATOR_HEAP_KEY
Heap Key for the global decorator(s).
|
Constructor and Description |
---|
GlobalDecorator(Decorator parent,
JsonValue config,
Heap heap,
String... reservedFieldNames)
Builds a new GlobalDecorator using given decorators JSON object element.
|
Modifier and Type | Method and Description |
---|---|
boolean |
accepts(Class<?> type)
Returns
true if this decorator is compatible with the provided component type. |
DecorationHandle |
decorate(Object delegate,
JsonValue ignored,
Context context)
Decorate the given object instance with the previously declared set of decorations instead of the provided one.
|
public static final String GLOBAL_DECORATOR_HEAP_KEY
public GlobalDecorator(Decorator parent, JsonValue config, Heap heap, String... reservedFieldNames)
parent
- the parent global decorator from which additional global
decorators may be inherited. May be null
config
- a JSON configurationheap
- the heap where this global decorator is declared (never null
)reservedFieldNames
- the names of reserved top level fields in the config whichpublic boolean accepts(Class<?> type)
Decorator
true
if this decorator is compatible with the provided component type. Note that a return value
of true
does not necessarily indicate that decoration will be performed since it may also depend on other
factorspublic DecorationHandle decorate(Object delegate, JsonValue ignored, Context context) throws HeapException
decorate
in interface Decorator
delegate
- instance to decorateignored
- ignored (may probably be null
)context
- Context of the heap object to be decoratedHeapException
- if one of the decorator failed to decorate the instanceCopyright 2011-2017 ForgeRock AS.