EMMA Coverage Report (generated Thu May 22 12:08:10 CDT 2014)
[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)32%  (6/19)

COVERAGE BREAKDOWN BY CLASS AND METHOD

nameclass, %method, %block, %line, %
     
class AbstractEventWriterWrapper100% (1/1)30%  (3/10)29%  (14/49)32%  (6/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)
close (): void 0%   (0/1)0%   (0/4)0%   (0/2)
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)
flush (): void 100% (1/1)100% (4/4)100% (2/2)
getNamespaceContext (): NamespaceContext 100% (1/1)100% (4/4)100% (1/1)

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    @Override
40        public void add(XMLEvent event) throws XMLStreamException {
41                wrappedEventWriter.add(event);
42        }
43 
44    @Override
45        public void add(XMLEventReader reader) throws XMLStreamException {
46                wrappedEventWriter.add(reader);
47        }
48 
49    @Override
50        public void close() throws XMLStreamException {
51                wrappedEventWriter.close();
52        }
53 
54    @Override
55        public void flush() throws XMLStreamException {
56                wrappedEventWriter.flush();
57        }
58 
59    @Override
60        public NamespaceContext getNamespaceContext() {
61                return wrappedEventWriter.getNamespaceContext();
62        }
63 
64    @Override
65        public String getPrefix(String uri) throws XMLStreamException {
66                return wrappedEventWriter.getPrefix(uri);
67        }
68 
69    @Override
70        public void setDefaultNamespace(String uri) throws XMLStreamException {
71                wrappedEventWriter.setDefaultNamespace(uri);
72        }
73 
74    @Override
75        public void setNamespaceContext(NamespaceContext context) throws XMLStreamException {
76                wrappedEventWriter.setNamespaceContext(context);
77        }
78 
79    @Override
80        public void setPrefix(String prefix, String uri) throws XMLStreamException {
81                wrappedEventWriter.setPrefix(prefix, uri);
82        }
83}

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