-
Notifications
You must be signed in to change notification settings - Fork 45
/
Interceptor12.java
52 lines (41 loc) · 1.47 KB
/
Interceptor12.java
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
package org.jboss.cdi.tck.interceptors.tests.contract.invocationContext;
import jakarta.annotation.Priority;
import jakarta.interceptor.AroundInvoke;
import jakarta.interceptor.Interceptor;
import jakarta.interceptor.InvocationContext;
import java.lang.annotation.Annotation;
import java.util.Set;
@Interceptor
@Binding12
@Priority(1200)
public class Interceptor12 {
private static Set<Annotation> allBindings;
private static Set<Binding12> binding12s; // must be non-empty
private static Binding12 binding12; // must be non-null
private static Set<Binding5> binding5s; // must be empty
private static Binding6 binding6; // must be null
@AroundInvoke
public Object intercept(InvocationContext ctx) throws Exception {
allBindings = ctx.getInterceptorBindings();
binding12s = ctx.getInterceptorBindings(Binding12.class);
binding12 = ctx.getInterceptorBinding(Binding12.class);
binding5s = ctx.getInterceptorBindings(Binding5.class);
binding6 = ctx.getInterceptorBinding(Binding6.class);
return ctx.proceed();
}
public static Set<Annotation> getAllBindings() {
return allBindings;
}
public static Set<Binding12> getBinding12s() {
return binding12s;
}
public static Binding12 getBinding12() {
return binding12;
}
public static Set<Binding5> getBinding5s() {
return binding5s;
}
public static Binding6 getBinding6() {
return binding6;
}
}