Module ch.qos.logback.core
Class AppenderRefDependencyAnalyser
- java.lang.Object
-
- ch.qos.logback.core.spi.ContextAwareBase
-
- ch.qos.logback.core.model.processor.ModelHandlerBase
-
- ch.qos.logback.core.model.processor.AppenderRefDependencyAnalyser
-
- All Implemented Interfaces:
ContextAware
public class AppenderRefDependencyAnalyser extends ModelHandlerBase
The AppenderRefDependencyAnalyser class is responsible for analyzing dependencies related to appender references within a logging model. This class extends ModelHandlerBase and operates during the dependency analysis phase of processing. The primary responsibilities of this class include: - Identifying instances ofAppenderRefModelwithin a model hierarchy. - Substituting references to appender models using the context's interpretation logic. - Adding dependency definitions for the identified appender references to the interpretation context.
-
-
Field Summary
-
Fields inherited from class ch.qos.logback.core.spi.ContextAwareBase
context
-
-
Constructor Summary
Constructors Constructor Description AppenderRefDependencyAnalyser(Context context)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidcollectAllAppenderRefModels(List<AppenderRefModel> list, Model model)Recursively processes the given Model object and its submodels, extracting instances of AppenderRefModel and adding them to the provided list.protected Class<Model>getSupportedModelClass()Subclasses should return the subclass of Model that they expect to handle.voidhandle(ModelInterpretationContext mic, Model parentModel)-
Methods inherited from class ch.qos.logback.core.model.processor.ModelHandlerBase
isSupportedModelType, postHandle, toString
-
Methods inherited from class ch.qos.logback.core.spi.ContextAwareBase
addError, addError, addInfo, addInfo, addStatus, addWarn, addWarn, getContext, getDeclaredOrigin, getStatusManager, setContext
-
-
-
-
Constructor Detail
-
AppenderRefDependencyAnalyser
public AppenderRefDependencyAnalyser(Context context)
-
-
Method Detail
-
getSupportedModelClass
protected Class<Model> getSupportedModelClass()
Description copied from class:ModelHandlerBaseSubclasses should return the subclass of Model that they expect to handle. The default implementation assumes that all Model classes are supported. This a very lax assumption which is usually not true.- Overrides:
getSupportedModelClassin classModelHandlerBase- Returns:
- supported model class
- See Also:
ModelHandlerBase.isSupportedModelType(Model)
-
handle
public void handle(ModelInterpretationContext mic, Model parentModel) throws ModelHandlerException
- Specified by:
handlein classModelHandlerBase- Throws:
ModelHandlerException
-
collectAllAppenderRefModels
public void collectAllAppenderRefModels(List<AppenderRefModel> list, Model model)
Recursively processes the given Model object and its submodels, extracting instances of AppenderRefModel and adding them to the provided list.- Parameters:
list- the list to which AppenderRefModel instances are addedmodel- the root Model object from which to start the extraction
-
-