createHandlers(List)   A
last analyzed

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.hltech.pact.gen.domain.client.annotation.handlers.AnnotatedMethodHandler;
4
5
import java.util.ArrayList;
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 = new ArrayList<>();
14
15
        for (Class<?> handlerClass : classes) {
16
            result.add((AnnotatedMethodHandler) handlerClass.newInstance());
17
        }
18
19
        return result;
20
    }
21
}
22