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

createHandlers(List)   A

Complexity

Conditions 2

Size

Total Lines 10
Code Lines 6

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
cc 2
eloc 6
c 1
b 0
f 0
dl 0
loc 10
rs 10
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