ch.qos.logback.core.rolling.helper

## Class FileNamePattern

- java.lang.Object
- - ch.qos.logback.core.spi.ContextAwareBase
  - - ch.qos.logback.core.rolling.helper.FileNamePattern

All Implemented Interfaces:
  ContextAware

    public class FileNamePattern
    extends ContextAwareBase

After parsing file name patterns, given a number or a date, instances of this class can be used to compute a file name according to the file name pattern and the given integer or date.

Author:
  Ceki Gülcü

### Field Summary

### Fields inherited from class ch.qos.logback.core.spi.ContextAwareBase

`context`

### Constructor Summary

Constructors
Constructor and Description
`FileNamePattern(java.lang.String patternArg, Context contextArg)`

### Method Summary

Methods
`java.lang.String` `convert(java.lang.Object o)`
`java.lang.String` `convertInt(int i)`
`java.lang.String` `convertMultipleArguments(java.lang.Object... objectList)`
`IntegerTokenConverter` `getIntegerTokenConverter()`
`java.lang.String` `getPattern()`
`DateTokenConverter` `getPrimaryDateTokenConverter()`
`void` `setPattern(java.lang.String pattern)`
`java.lang.String` `toRegex()` Given date, convert this instance to a regular expression
`java.lang.String` `toRegexForFixedDate(java.util.Date date)` Given date, convert this instance to a regular expression.
`java.lang.String` `toString()`

### 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, wait, wait, wait`

### Constructor Detail

#### FileNamePattern

    public FileNamePattern(java.lang.String patternArg,
                   Context contextArg)

### Method Detail

#### toString

    public java.lang.String toString()

Overrides:
  `toString` in class `java.lang.Object`

#### getPrimaryDateTokenConverter

    public DateTokenConverter getPrimaryDateTokenConverter()

#### getIntegerTokenConverter

    public IntegerTokenConverter getIntegerTokenConverter()

#### convertMultipleArguments

    public java.lang.String convertMultipleArguments(java.lang.Object... objectList)

#### convert

    public java.lang.String convert(java.lang.Object o)

#### convertInt

    public java.lang.String convertInt(int i)

#### setPattern

    public void setPattern(java.lang.String pattern)

#### getPattern

    public java.lang.String getPattern()

#### toRegexForFixedDate

    public java.lang.String toRegexForFixedDate(java.util.Date date)

Given date, convert this instance to a regular expression. Used to compute sub-regex when the pattern has both %d and %i, and the date is known.

#### toRegex

    public java.lang.String toRegex()

Given date, convert this instance to a regular expression