View Javadoc
1   /**
2    * Logback: the reliable, generic, fast and flexible logging framework.
3    * Copyright (C) 1999-2015, QOS.ch. All rights reserved.
4    *
5    * This program and the accompanying materials are dual-licensed under
6    * either the terms of the Eclipse Public License v1.0 as published by
7    * the Eclipse Foundation
8    *
9    *   or (per the licensee's choosing)
10   *
11   * under the terms of the GNU Lesser General Public License version 2.1
12   * as published by the Free Software Foundation.
13   */
14  package ch.qos.logback.core.joran.action;
15  
16  import java.util.HashMap;
17  
18  import org.xml.sax.Attributes;
19  
20  public class DummyAttributes implements Attributes {
21  
22      HashMap<String, String> atts = new HashMap<String, String>();
23  
24      public int getIndex(String qName) {
25          return 0;
26      }
27  
28      public int getIndex(String uri, String localName) {
29          return 0;
30      }
31  
32      public int getLength() {
33          return 0;
34      }
35  
36      public String getLocalName(int index) {
37          return null;
38      }
39  
40      public String getQName(int index) {
41          return null;
42      }
43  
44      public String getType(int index) {
45          return null;
46      }
47  
48      public String getType(String qName) {
49          return null;
50      }
51  
52      public String getType(String uri, String localName) {
53          return null;
54      }
55  
56      public String getURI(int index) {
57          return null;
58      }
59  
60      public String getValue(int index) {
61          return null;
62      }
63  
64      public String getValue(String qName) {
65          return atts.get(qName);
66      }
67  
68      public void setValue(String key, String value) {
69          atts.put(key, value);
70      }
71  
72      public String getValue(String uri, String localName) {
73          return null;
74      }
75  
76  }