Module ch.qos.logback.core
Class ModelInterpretationContext
- java.lang.Object
-
- ch.qos.logback.core.spi.ContextAwareBase
-
- ch.qos.logback.core.model.processor.ModelInterpretationContext
-
- All Implemented Interfaces:
ContextAware,ContextAwarePropertyContainer,PropertyContainer
public class ModelInterpretationContext extends ContextAwareBase implements ContextAwarePropertyContainer
-
-
Field Summary
Fields Modifier and Type Field Description protected Map<String,String>importMapprotected VariableSubstitutionsHelpervariableSubstitutionsHelper-
Fields inherited from class ch.qos.logback.core.spi.ContextAwareBase
context
-
-
Constructor Summary
Constructors Constructor Description ModelInterpretationContext(Context context)ModelInterpretationContext(Context context, Object configuratorHint)ModelInterpretationContext(ModelInterpretationContext otherMic)
-
Method Summary
-
Methods inherited from class ch.qos.logback.core.spi.ContextAwareBase
addError, addError, addInfo, addInfo, addStatus, addWarn, addWarn, getContext, getDeclaredOrigin, getStatusManager, setContext
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface ch.qos.logback.core.spi.ContextAware
addError, addError, addInfo, addInfo, addStatus, addWarn, addWarn, getContext, setContext
-
Methods inherited from interface ch.qos.logback.core.spi.PropertyContainer
addSubstitutionProperties
-
-
-
-
Field Detail
-
variableSubstitutionsHelper
protected VariableSubstitutionsHelper variableSubstitutionsHelper
-
-
Constructor Detail
-
ModelInterpretationContext
public ModelInterpretationContext(Context context)
-
ModelInterpretationContext
public ModelInterpretationContext(Context context, Object configuratorHint)
-
ModelInterpretationContext
public ModelInterpretationContext(ModelInterpretationContext otherMic)
-
-
Method Detail
-
getObjectMap
public Map<String,Object> getObjectMap()
-
createAppenderBags
public void createAppenderBags()
-
getTopModel
public Model getTopModel()
-
setTopModel
public void setTopModel(Model topModel)
-
isModelStackEmpty
public boolean isModelStackEmpty()
-
getObjectStack
public Stack<Object> getObjectStack()
-
isObjectStackEmpty
public boolean isObjectStackEmpty()
-
peekObject
public Object peekObject()
-
pushObject
public void pushObject(Object o)
-
getConfiguratorHint
public Object getConfiguratorHint()
-
setConfiguratorHint
public void setConfiguratorHint(Object configuratorHint)
-
getBeanDescriptionCache
public BeanDescriptionCache getBeanDescriptionCache()
-
subst
public String subst(String ref)
Performs variable substitution on the providedrefstring.Value substitution will follow the order
- properties defined in this
ModelInterpretationContext - properties defined in the
contextof thisModelInterpretationContext - System properties
- Environment variables
If value substitution occurs it will be output as a status message, unless marked confidential, that is, if
refcontains the case-insensitive strings PASSWORD, SECRET or CONFIDENTIAL.- Specified by:
substin interfaceContextAwarePropertyContainer- Parameters:
ref- the string that may contain variables to be substituted; can benull- Returns:
- the string with substitutions applied if applicable; may return
nullifrefisnull
- properties defined in this
-
getDefaultNestedComponentRegistry
public DefaultNestedComponentRegistry getDefaultNestedComponentRegistry()
-
addDependencyDefinition
public void addDependencyDefinition(DependencyDefinition dd)
-
getDependencyDefinitions
public List<DependencyDefinition> getDependencyDefinitions()
-
getDependencyNamesForModel
public List<String> getDependencyNamesForModel(Model model)
-
hasDependers
public boolean hasDependers(String dependencyName)
-
markStartOfNamedDependee
public void markStartOfNamedDependee(String name)
-
isNamedDependemcyStarted
public boolean isNamedDependemcyStarted(String name)
-
addSubstitutionProperty
public void addSubstitutionProperty(String key, String value)
Add a property to the properties of this execution context. If the property exists already, it is overwritten.- Specified by:
addSubstitutionPropertyin interfacePropertyContainer
-
getProperty
public String getProperty(String key)
If a key is found in propertiesMap then return it. Otherwise, delegate to the context.- Specified by:
getPropertyin interfacePropertyContainer
-
getCopyOfPropertyMap
public Map<String,String> getCopyOfPropertyMap()
- Specified by:
getCopyOfPropertyMapin interfacePropertyContainer
-
addImport
public void addImport(String stem, String fqcn)
Add an import to the importMao- Parameters:
stem- the class to importfqcn- the fully qualified name of the class- Since:
- 1.3
-
getImportMapCopy
public Map<String,String> getImportMapCopy()
-
getImport
public String getImport(String stem)
Given a stem, get the fully qualified name of the class corresponding to the stem. For unknown stems, returns the stem as is. If stem is null, null is returned.- Parameters:
stem- may be null- Returns:
- fully qualified name of the class corresponding to the stem. For unknown stems, returns the stem as is. If stem is null, null is returned.
- Since:
- 1.3
-
getConfiguratorSupplier
public Supplier<? extends GenericXMLConfigurator> getConfiguratorSupplier()
Returns a supplier ofGenericXMLConfiguratorinstance. The returned value may be null.- Specified by:
getConfiguratorSupplierin interfaceContextAwarePropertyContainer- Returns:
- a supplier of
GenericXMLConfiguratorinstance, may be null
-
setConfiguratorSupplier
public void setConfiguratorSupplier(Supplier<? extends GenericXMLConfigurator> configuratorSupplier)
- Parameters:
configuratorSupplier-
-
getTopScanBoolean
public Boolean getTopScanBoolean()
-
setTopScanBoolean
public void setTopScanBoolean(Boolean topScanBoolean)
-
-