1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19 package org.eclipse.jetty.annotations;
20
21 import java.util.List;
22
23 import org.eclipse.jetty.annotations.AnnotationParser.Value;
24 import org.eclipse.jetty.util.log.Log;
25 import org.eclipse.jetty.util.log.Logger;
26 import org.eclipse.jetty.webapp.DiscoveredAnnotation;
27 import org.eclipse.jetty.webapp.WebAppContext;
28
29
30
31
32
33
34 public class WebFilterAnnotationHandler extends AbstractDiscoverableAnnotationHandler
35 {
36 private static final Logger LOG = Log.getLogger(WebFilterAnnotationHandler.class);
37
38 public WebFilterAnnotationHandler (WebAppContext context)
39 {
40 super(context);
41 }
42
43 public WebFilterAnnotationHandler (WebAppContext context, List<DiscoveredAnnotation> list)
44 {
45 super(context, list);
46 }
47
48 @Override
49 public void handleClass(String className, int version, int access, String signature, String superName, String[] interfaces, String annotation,
50 List<Value> values)
51 {
52 WebFilterAnnotation wfAnnotation = new WebFilterAnnotation(_context, className, _resource);
53 addAnnotation(wfAnnotation);
54 }
55
56 @Override
57 public void handleField(String className, String fieldName, int access, String fieldType, String signature, Object value, String annotation,
58 List<Value> values)
59 {
60 LOG.warn ("@WebFilter not applicable for fields: "+className+"."+fieldName);
61 }
62
63 @Override
64 public void handleMethod(String className, String methodName, int access, String params, String signature, String[] exceptions, String annotation,
65 List<Value> values)
66 {
67 LOG.warn ("@WebFilter not applicable for methods: "+className+"."+methodName+" "+signature);
68 }
69
70 @Override
71 public String getAnnotationName()
72 {
73 return "javax.servlet.annotation.WebFilter";
74 }
75
76 }