EMMA Coverage Report (generated Thu Jan 24 13:37:04 CST 2013)
[all classes][org.springframework.batch.core.step.skip]

COVERAGE SUMMARY FOR SOURCE FILE [CompositeSkipPolicy.java]

nameclass, %method, %block, %line, %
CompositeSkipPolicy.java100% (1/1)50%  (2/4)78%  (32/41)64%  (7/11)

COVERAGE BREAKDOWN BY CLASS AND METHOD

nameclass, %method, %block, %line, %
     
class CompositeSkipPolicy100% (1/1)50%  (2/4)78%  (32/41)64%  (7/11)
CompositeSkipPolicy (): void 0%   (0/1)0%   (0/5)0%   (0/2)
setSkipPolicies (SkipPolicy []): void 0%   (0/1)0%   (0/4)0%   (0/2)
CompositeSkipPolicy (SkipPolicy []): void 100% (1/1)100% (6/6)100% (3/3)
shouldSkip (Throwable, int): boolean 100% (1/1)100% (26/26)100% (4/4)

1/*
2 * Copyright 2006-2011 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.core.step.skip;
17 
18/**
19 * @author Dave Syer
20 *
21 */
22public class CompositeSkipPolicy implements SkipPolicy {
23 
24        private SkipPolicy[] skipPolicies;
25        
26        public CompositeSkipPolicy() {
27                this(new SkipPolicy[0]);
28        }
29 
30        public CompositeSkipPolicy(SkipPolicy[] skipPolicies) {
31                this.skipPolicies = skipPolicies;
32        }
33        
34        public void setSkipPolicies(SkipPolicy[] skipPolicies) {
35                this.skipPolicies = skipPolicies;
36        }
37 
38        public boolean shouldSkip(Throwable t, int skipCount) throws SkipLimitExceededException {
39                for (SkipPolicy policy : skipPolicies) {
40                        if (policy.shouldSkip(t, skipCount)) {
41                                return true;
42                        }
43                }
44                return false;
45        }
46 
47}

[all classes][org.springframework.batch.core.step.skip]
EMMA 2.0.5312 (C) Vladimir Roubtsov