View Javadoc

1   
2   package ch.qos.logback.core.rolling.helper;
3   
4   
5   /**
6    * <code>TokenConverter</code> offers some basic functionality used by more 
7    * specific token  converters. 
8    * <p>
9    * It basically sets up the chained architecture for tokens. It also forces 
10   * derived classes to fix their type.
11   * 
12   * @author Ceki
13   * @since 1.3
14   */
15  public class TokenConverter {
16    
17    
18    static final int IDENTITY = 0;
19    static final int INTEGER = 1;
20    static final int DATE = 1;
21    int type;
22    TokenConverter next;
23  
24    protected TokenConverter(int t) {
25      type = t;
26    }
27  
28    public TokenConverter getNext() {
29      return next;
30    }
31  
32    public void setNext(TokenConverter next) {
33      this.next = next;
34    }
35   
36    public int getType() {
37      return type;
38    }
39  
40    public void setType(int i) {
41      type = i;
42    }
43  
44  }