EMMA Coverage Report (generated Thu Jan 24 13:37:04 CST 2013)
[all classes][org.springframework.batch.item.xml.stax]

COVERAGE SUMMARY FOR SOURCE FILE [AbstractEventWriterWrapper.java]

nameclass, %method, %block, %line, %
AbstractEventWriterWrapper.java100% (1/1)30%  (3/10)29%  (14/49)37%  (7/19)

COVERAGE BREAKDOWN BY CLASS AND METHOD

nameclass, %method, %block, %line, %
     
class AbstractEventWriterWrapper100% (1/1)30%  (3/10)29%  (14/49)37%  (7/19)
add (XMLEvent): void 0%   (0/1)0%   (0/5)0%   (0/2)
add (XMLEventReader): void 0%   (0/1)0%   (0/5)0%   (0/2)
getNamespaceContext (): NamespaceContext 0%   (0/1)0%   (0/4)0%   (0/1)
getPrefix (String): String 0%   (0/1)0%   (0/5)0%   (0/1)
setDefaultNamespace (String): void 0%   (0/1)0%   (0/5)0%   (0/2)
setNamespaceContext (NamespaceContext): void 0%   (0/1)0%   (0/5)0%   (0/2)
setPrefix (String, String): void 0%   (0/1)0%   (0/6)0%   (0/2)
AbstractEventWriterWrapper (XMLEventWriter): void 100% (1/1)100% (6/6)100% (3/3)
close (): void 100% (1/1)100% (4/4)100% (2/2)
flush (): void 100% (1/1)100% (4/4)100% (2/2)

1/*
2 * Copyright 2006-2007 the original author or authors.
3 *
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
7 *
8 *      http://www.apache.org/licenses/LICENSE-2.0
9 *
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
15 */
16 
17package org.springframework.batch.item.xml.stax;
18 
19import javax.xml.namespace.NamespaceContext;
20import javax.xml.stream.XMLEventReader;
21import javax.xml.stream.XMLEventWriter;
22import javax.xml.stream.XMLStreamException;
23import javax.xml.stream.events.XMLEvent;
24 
25/**
26 * Delegates all functionality to the wrapped writer allowing
27 * subclasses to override only the methods they want to change.
28 * 
29 * @author Robert Kasanicky
30 */
31abstract class AbstractEventWriterWrapper implements XMLEventWriter {
32        
33        protected XMLEventWriter wrappedEventWriter;
34 
35        public AbstractEventWriterWrapper(XMLEventWriter wrappedEventWriter) {
36                this.wrappedEventWriter = wrappedEventWriter;
37        }
38 
39        public void add(XMLEvent event) throws XMLStreamException {
40                wrappedEventWriter.add(event);
41        }
42 
43        public void add(XMLEventReader reader) throws XMLStreamException {
44                wrappedEventWriter.add(reader);
45        }
46 
47        public void close() throws XMLStreamException {
48                wrappedEventWriter.close();
49        }
50 
51        public void flush() throws XMLStreamException {
52                wrappedEventWriter.flush();
53        }
54 
55        public NamespaceContext getNamespaceContext() {
56                return wrappedEventWriter.getNamespaceContext();
57        }
58 
59        public String getPrefix(String uri) throws XMLStreamException {
60                return wrappedEventWriter.getPrefix(uri);
61        }
62 
63        public void setDefaultNamespace(String uri) throws XMLStreamException {
64                wrappedEventWriter.setDefaultNamespace(uri);
65        }
66 
67        public void setNamespaceContext(NamespaceContext context) throws XMLStreamException {
68                wrappedEventWriter.setNamespaceContext(context);
69        }
70 
71        public void setPrefix(String prefix, String uri) throws XMLStreamException {
72                wrappedEventWriter.setPrefix(prefix, uri);
73        }
74}

[all classes][org.springframework.batch.item.xml.stax]
EMMA 2.0.5312 (C) Vladimir Roubtsov