Top Description Fields Constructors Methods
ch.qos.logback.core.joran.util.beans

public Class BeanDescriptionCache

extends ContextAwareBase
Class Inheritance
Imports
java.util.HashMap, .Map, ch.qos.logback.core.Context, ch.qos.logback.core.spi.ContextAwareBase

Cache for BeanDescription instances. All the cache users which use the same instance of BeanDescriptionCache can profit from each others cached bean descriptions.

The cache is not thread-safe and should not be shared across configurator instances.

Author
urechm

Field Summary

Modifier and TypeField and Description
private BeanDescriptionFactory
private Map<Class<?>, BeanDescription>
Inherited from ch.qos.logback.core.spi.ContextAwareBase:
context

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public BeanDescription

Returns:

a bean description for the given class.
getBeanDescription
(Class<?>
to get a bean description for.
clazz
)

Returned bean descriptions are hold in a cache.

private BeanDescriptionFactory
Inherited from ch.qos.logback.core.spi.ContextAwareBase:
addErroraddErroraddInfoaddInfoaddStatusaddWarnaddWarngetContextgetDeclaredOrigingetStatusManagersetContext

Field Detail

beanDescriptionFactoryback to summary
private BeanDescriptionFactory beanDescriptionFactory
classToBeanDescriptionback to summary
private Map<Class<?>, BeanDescription> classToBeanDescription

Constructor Detail

BeanDescriptionCacheback to summary
public BeanDescriptionCache(Context context)

Method Detail

getBeanDescriptionback to summary
public BeanDescription getBeanDescription(Class<?> clazz)

Returned bean descriptions are hold in a cache. If the cache does not contain a description for a given class, a new bean description is created and put in the cache, before it is returned.

Parameters
clazz:Class<?>

to get a bean description for.

Returns:BeanDescription

a bean description for the given class.

getBeanDescriptionFactoryback to summary
private BeanDescriptionFactory getBeanDescriptionFactory()