|
|||||||||||||||||||
30 day Evaluation Version distributed via the Maven Jar Repository. Clover is not free. You have 30 days to evaluate it. Please visit http://www.thecortex.net/clover to obtain a licensed version of Clover | |||||||||||||||||||
Source file | Conditionals | Statements | Methods | TOTAL | |||||||||||||||
SaxUtils.java | 100% | 42.9% | 33.3% | 50% |
|
1 |
/*
|
|
2 |
* brownies and its relative products are published under the terms
|
|
3 |
* of the Apache Software License.
|
|
4 |
*
|
|
5 |
* Created on 2004/08/15 16:26:10
|
|
6 |
*/
|
|
7 |
package org.asyrinx.brownie.core.xml.sax;
|
|
8 |
|
|
9 |
import java.util.HashMap;
|
|
10 |
import java.util.Map;
|
|
11 |
|
|
12 |
import org.xml.sax.Attributes;
|
|
13 |
|
|
14 |
/**
|
|
15 |
* @author akima
|
|
16 |
*/
|
|
17 |
public class SaxUtils { |
|
18 |
|
|
19 |
/**
|
|
20 |
*
|
|
21 |
*/
|
|
22 | 0 |
public SaxUtils() {
|
23 | 0 |
super();
|
24 |
} |
|
25 |
|
|
26 | 0 |
public static Map toMap(Attributes attributes) { |
27 | 0 |
final Map result = new HashMap();
|
28 | 0 |
addToMap(attributes, result); |
29 | 0 |
return result;
|
30 |
} |
|
31 |
|
|
32 | 1 |
public static void addToMap(Attributes attributes, Map dest) { |
33 | 1 |
final int length = attributes.getLength();
|
34 | 1 |
for (int i = 0; i < length; i++) { |
35 | 2 |
dest.put(attributes.getQName(i), attributes.getValue(i)); |
36 |
} |
|
37 |
} |
|
38 |
|
|
39 |
} |
|