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
`protected boolean` `started` Is this component active?

### Constructor Summary

Constructors
`DynamicConverter()`

### Method Summary

All Methods Instance Methods Concrete Methods
`void` `addError​(java.lang.String msg)`
`void` `addError​(java.lang.String msg, java.lang.Throwable ex)`
`void` `addInfo​(java.lang.String msg)`
`void` `addInfo​(java.lang.String msg, java.lang.Throwable ex)`
`void` `addStatus​(Status status)`
`void` `addWarn​(java.lang.String msg)`
`void` `addWarn​(java.lang.String msg, java.lang.Throwable ex)`
`Context` `getContext()`
`java.lang.String` `getFirstOption()` Return the first option passed to this component.
`protected java.util.List<java.lang.String>` `getOptionList()`
`boolean` `isStarted()`
`void` `setContext​(Context context)`
`void` `setOptionList​(java.util.List<java.lang.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 Detail

#### started

    protected boolean started

Is this component active?

### Constructor Detail

#### DynamicConverter

    public DynamicConverter()

### Method Detail

#### 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​(java.util.List<java.lang.String> optionList)

#### getFirstOption

    public java.lang.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 java.util.List<java.lang.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​(java.lang.String msg)

Specified by:
  `addInfo` in interface `ContextAware`

#### addInfo

    public void addInfo​(java.lang.String msg,
                        java.lang.Throwable ex)

Specified by:
  `addInfo` in interface `ContextAware`

#### addWarn

    public void addWarn​(java.lang.String msg)

Specified by:
  `addWarn` in interface `ContextAware`

#### addWarn

    public void addWarn​(java.lang.String msg,
                        java.lang.Throwable ex)

Specified by:
  `addWarn` in interface `ContextAware`

#### addError

    public void addError​(java.lang.String msg)

Specified by:
  `addError` in interface `ContextAware`

#### addError

    public void addError​(java.lang.String msg,
                         java.lang.Throwable ex)

Specified by:
  `addError` in interface `ContextAware`