Passed
Push — main ( e3287a...08aeb5 )
by Hao
03:41
created

io.github.ro4.annotation.CheckableMethodMatcher   A

Complexity

Total Complexity 3

Size/Duplication

Total Lines 15
Duplicated Lines 0 %

Test Coverage

Coverage 75%

Importance

Changes 0
Metric Value
dl 0
loc 15
ccs 3
cts 4
cp 0.75
rs 10
c 0
b 0
f 0
eloc 10
wmc 3

3 Methods

Rating   Name   Duplication   Size   Complexity  
A matches(Method,Class,Object) 0 3 1
A isRuntime() 0 3 1
A matches(Method,Class) 0 3 1
1
package io.github.ro4.annotation;
2
3
import org.springframework.aop.MethodMatcher;
4
5
import java.lang.reflect.Method;
6
7 1
public class CheckableMethodMatcher implements MethodMatcher {
8
9
    @Override
10
    public boolean matches(Method method, Class<?> targetClass) {
11 1
        return method.isAnnotationPresent(Checkable.class);
12
    }
13
14
    @Override
15
    public boolean isRuntime() {
16 1
        return false;
17
    }
18
19
    @Override
20
    public boolean matches(Method method, Class<?> targetClass, Object... args) {
21
        return matches(method, targetClass);
22
    }
23
}