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

public Class AggregationAssessor

extends ContextAwareBase
Class Inheritance
Imports
ch.qos.logback.core.joran.spi.DefaultClass, .DefaultNestedComponentRegistry, ch.qos.logback.core.joran.util.beans.BeanDescription, .BeanDescriptionCache, .BeanUtil, ch.qos.logback.core.spi.ContextAwareBase, ch.qos.logback.core.util.AggregationType, .StringUtil, java.lang.annotation.Annotation, java.lang.reflect.InvocationTargetException, .Method

Various utility methods for computing the AggregationType of a given property or the class name of a property given implicit rules.

This class was extracted from PropertySetter.

Since
1.5.1

Field Summary

Modifier and TypeField and Description
protected final BeanDescription
protected final Class<?>
Inherited from ch.qos.logback.core.spi.ContextAwareBase:
context

Constructor Summary

AccessConstructor and Description
public
AggregationAssessor(BeanDescriptionCache beanDescriptionCache, Class<T> objClass)

Method Summary

Modifier and TypeMethod and Description
public AggregationType

Returns:

the computed AggregationType
computeAggregationType
(String name)

Given a property name, this method computes/assesses AggregationType for the property for the class passed to the constructor.

private AggregationType
public Method
public Method
pack-priv <T extends Annotation> T
getAnnotation(String name, Class<T> annonationClass, Method relevantMethod)

pack-priv Class<?>
getByConcreteType(String name, Method relevantMethod)

public Class<?>
pack-priv Class<?>
private Class<?>
pack-priv Method
getRelevantMethod(String name, AggregationType aggregationType)

private boolean

Returns:

true if clazz can be instantiated, and false otherwise.
isUnequivocallyInstantiable
(Class<?>
The class to test for instantiability
clazz
)

Can the given clazz instantiable with certainty?

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

Field Detail

beanDescriptionback to summary
protected final BeanDescription beanDescription
objClassback to summary
protected final Class<?> objClass

Constructor Detail

AggregationAssessorback to summary
public AggregationAssessor(BeanDescriptionCache beanDescriptionCache, Class<T> objClass)

Method Detail

computeAggregationTypeback to summary
public AggregationType computeAggregationType(String name)

Given a property name, this method computes/assesses AggregationType for the property for the class passed to the constructor.

Returns:AggregationType

the computed AggregationType

computeRawAggregationTypeback to summary
private AggregationType computeRawAggregationType(Method method)
findAdderMethodback to summary
public Method findAdderMethod(String name)
findSetterMethodback to summary
public Method findSetterMethod(String name)
getAnnotationback to summary
pack-priv <T extends Annotation> T getAnnotation(String name, Class<T> annonationClass, Method relevantMethod)
getByConcreteTypeback to summary
pack-priv Class<?> getByConcreteType(String name, Method relevantMethod)
getClassNameViaImplicitRulesback to summary
public Class<?> getClassNameViaImplicitRules(String name, AggregationType aggregationType, DefaultNestedComponentRegistry registry)
getDefaultClassNameByAnnonationback to summary
pack-priv Class<?> getDefaultClassNameByAnnonation(String name, Method relevantMethod)
getParameterClassForMethodback to summary
private Class<?> getParameterClassForMethod(Method method)
getRelevantMethodback to summary
pack-priv Method getRelevantMethod(String name, AggregationType aggregationType)
isUnequivocallyInstantiableback to summary
private boolean isUnequivocallyInstantiable(Class<?> clazz)

Can the given clazz instantiable with certainty?

Parameters
clazz:Class<?>

The class to test for instantiability

Returns:boolean

true if clazz can be instantiated, and false otherwise.