EMMA Coverage Report (generated Thu May 22 12:08:10 CDT 2014)
[all classes][org.springframework.batch.item]

COVERAGE SUMMARY FOR SOURCE FILE [ItemStreamSupport.java]

nameclass, %method, %block, %line, %
ItemStreamSupport.java100% (1/1)100% (7/7)100% (25/25)100% (10/10)

COVERAGE BREAKDOWN BY CLASS AND METHOD

nameclass, %method, %block, %line, %
     
class ItemStreamSupport100% (1/1)100% (7/7)100% (25/25)100% (10/10)
ItemStreamSupport (): void 100% (1/1)100% (8/8)100% (2/2)
close (): void 100% (1/1)100% (1/1)100% (1/1)
getExecutionContextKey (String): String 100% (1/1)100% (5/5)100% (1/1)
open (ExecutionContext): void 100% (1/1)100% (1/1)100% (1/1)
setExecutionContextName (String): void 100% (1/1)100% (5/5)100% (2/2)
setName (String): void 100% (1/1)100% (4/4)100% (2/2)
update (ExecutionContext): void 100% (1/1)100% (1/1)100% (1/1)

1/*
2 * Copyright 2006-2013 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 */
16package org.springframework.batch.item;
17 
18import org.springframework.batch.item.util.ExecutionContextUserSupport;
19 
20/**
21 * Empty method implementation of {@link ItemStream}.
22 *
23 * @author Dave Syer
24 * @author Dean de Bree
25 *
26 */
27public abstract class ItemStreamSupport implements ItemStream {
28 
29        private final ExecutionContextUserSupport executionContextUserSupport = new ExecutionContextUserSupport();
30 
31        /**
32         * No-op.
33         * @see org.springframework.batch.item.ItemStream#close()
34         */
35        @Override
36        public void close() {
37        }
38 
39        /**
40         * No-op.
41         * @see org.springframework.batch.item.ItemStream#open(ExecutionContext)
42         */
43        @Override
44        public void open(ExecutionContext executionContext) {
45        }
46 
47        /**
48         * Return empty {@link ExecutionContext}.
49         * @see org.springframework.batch.item.ItemStream#update(ExecutionContext)
50         */
51        @Override
52        public void update(ExecutionContext executionContext) {
53        }
54        
55        /**
56         * The name of the component which will be used as a stem for keys in the
57         * {@link ExecutionContext}. Subclasses should provide a default value, e.g.
58         * the short form of the class name.
59         * 
60         * @param name the name for the component
61         */
62        public void setName(String name) {
63                this.setExecutionContextName(name);
64        }
65 
66        protected void setExecutionContextName(String name) {
67                executionContextUserSupport.setName(name);
68        }
69 
70        public String getExecutionContextKey(String key) {
71                return executionContextUserSupport.getKey(key);
72        }
73 
74}

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