Package ch.qos.logback.core.pattern

# Class DynamicConverter<E>

java.lang.Object
ch.qos.logback.core.pattern.Converter<E>
ch.qos.logback.core.pattern.FormattingConverter<E>
ch.qos.logback.core.pattern.DynamicConverter<E>

All Implemented Interfaces:
  `ContextAware`, `LifeCycle`

Direct Known Subclasses:
  `AccessConverter`, `ClassicConverter`, `CompositeConverter`, `DateTokenConverter`, `IntegerTokenConverter`

public abstract class DynamicConverter<E> extends FormattingConverter<E> implements LifeCycle, ContextAware

## Field Summary

Fields
Modifier and Type
Field
Description
`protected boolean`
`started`
Is this component active?

## Constructor Summary

Constructors
Constructor
Description
`DynamicConverter()`

## Method Summary

Modifier and Type
Method
Description
`void`
`addError(String msg)`
`void`
`addError(String msg, Throwable ex)`
`void`
`addInfo(String msg)`
`void`
`addInfo(String msg, Throwable ex)`
`void`
`addStatus(Status status)`
`void`
`addWarn(String msg)`
`void`
`addWarn(String msg, Throwable ex)`
`Context`
`getContext()`
`String`
`getFirstOption()`
Return the first option passed to this component.
`protected List<String>`
`getOptionList()`
`boolean`
`isStarted()`
`void`
`setContext(Context context)`
`void`
`setOptionList(List<String> optionList)`
`void`
`start()`
Components that depend on options passed during configuration can override this method in order to make appropriate use of those options.
`void`
`stop()`

### Methods inherited from class ch.qos.logback.core.pattern.FormattingConverter

`getFormattingInfo, setFormattingInfo, write`

### Methods inherited from class ch.qos.logback.core.pattern.Converter

`convert, getNext, setNext`

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

## Field Details

### started

protected boolean started
Is this component active?

## Constructor Details

### DynamicConverter

public DynamicConverter()

## Method Details

### start

public void start()
Components that depend on options passed during configuration can override this method in order to make appropriate use of those options. For simpler components, the trivial implementation found in this abstract class will be sufficient.

Specified by:
  `start` in interface `LifeCycle`

### stop

public void stop()

Specified by:
  `stop` in interface `LifeCycle`

### isStarted

public boolean isStarted()

Specified by:
  `isStarted` in interface `LifeCycle`

### setOptionList

public void setOptionList(List<String> optionList)

### getFirstOption

public String getFirstOption()
Return the first option passed to this component. The returned value may be null if there are no options.

Returns:
  First option, may be null.

### getOptionList

protected List<String> getOptionList()

### setContext

public void setContext(Context context)

Specified by:
  `setContext` in interface `ContextAware`

### getContext

public Context getContext()

Specified by:
  `getContext` in interface `ContextAware`

### addStatus

public void addStatus(Status status)

Specified by:
  `addStatus` in interface `ContextAware`

### addInfo

public void addInfo(String msg)

Specified by:
  `addInfo` in interface `ContextAware`

### addInfo

public void addInfo(String msg, Throwable ex)

Specified by:
  `addInfo` in interface `ContextAware`

### addWarn

public void addWarn(String msg)

Specified by:
  `addWarn` in interface `ContextAware`

### addWarn

public void addWarn(String msg, Throwable ex)

Specified by:
  `addWarn` in interface `ContextAware`

### addError

public void addError(String msg)

Specified by:
  `addError` in interface `ContextAware`

### addError

public void addError(String msg, Throwable ex)

Specified by:
  `addError` in interface `ContextAware`