Passed
Push — master ( 9be3b9...480662 )
by
unknown
08:13
created

com.hltech.pact.gen.domain.client.annotation.HandlersFactory   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 12
Duplicated Lines 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 7
c 1
b 0
f 0
dl 0
loc 12
rs 10
wmc 2

1 Method

Rating   Name   Duplication   Size   Complexity  
A createHandlers(List) 0 10 2
1
package com.hltech.pact.gen.domain.client.annotation;
2
3
import com.google.common.collect.Lists;
4
import com.hltech.pact.gen.domain.client.annotation.handlers.AnnotatedMethodHandler;
5
6
import java.util.List;
7
8
public class HandlersFactory {
9
10
    List<AnnotatedMethodHandler> createHandlers(List<Class<?>> classes)
11
        throws IllegalAccessException, InstantiationException {
12
13
        List<AnnotatedMethodHandler> result = Lists.newArrayList();
14
15
        for (Class<?> handlerClass : classes) {
16
            result.add((AnnotatedMethodHandler) handlerClass.newInstance());
17
        }
18
19
        return result;
20
    }
21
}
22