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 current date or integer.

Author:
  Ceki Gülcü

### Field Summary

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

`context`

### Constructor Summary

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

### Method Summary

All Methods Instance Methods Concrete Methods
`String` `convert(Object o)`
`String` `convertInt(int i)`
`String` `convertMultipleArguments(Object... objectList)`
`boolean` `equals(Object obj)`
`IntegerTokenConverter` `getIntegerTokenConverter()`
`String` `getPattern()`
`DateTokenConverter<Object>` `getPrimaryDateTokenConverter()`
`int` `hashCode()`
`boolean` `hasIntegerTokenCOnverter()`
`void` `setPattern(String pattern)`
`String` `toRegex()` Given date, convert this instance to a regular expression
`String` `toRegexForFixedDate(Date date)` Given date, convert this instance to a regular expression.
`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, finalize, getClass, notify, notifyAll, wait, wait, wait`

### Constructor Detail

#### FileNamePattern

    public FileNamePattern(String patternArg,
                           Context contextArg)

### Method Detail

#### toString

    public String toString()

Overrides:
  `toString` in class `Object`

#### hashCode

    public int hashCode()

Overrides:
  `hashCode` in class `Object`

#### equals

    public boolean equals(Object obj)

Overrides:
  `equals` in class `Object`

#### getPrimaryDateTokenConverter

    public DateTokenConverter<Object> getPrimaryDateTokenConverter()

#### getIntegerTokenConverter

    public IntegerTokenConverter getIntegerTokenConverter()

#### hasIntegerTokenCOnverter

    public boolean hasIntegerTokenCOnverter()

#### convertMultipleArguments

    public String convertMultipleArguments(Object... objectList)

#### convert

    public String convert(Object o)

#### convertInt

    public String convertInt(int i)

#### setPattern

    public void setPattern(String pattern)

#### getPattern

    public String getPattern()

#### toRegexForFixedDate

    public String toRegexForFixedDate(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 String toRegex()

Given date, convert this instance to a regular expression