@@ -25,18 +25,15 @@ string getAJaxRsPackage(string subpackage) { result = getAJaxRsPackage() + "." +
2525class JaxWsEndpoint extends Class {
2626 JaxWsEndpoint ( ) {
2727 exists ( AnnotationType a | a = this .getAnAnnotation ( ) .getType ( ) |
28- a .hasName ( "WebService" ) or
29- a .hasName ( "WebServiceProvider" ) or
30- a .hasName ( "WebServiceClient" )
28+ a .hasName ( [ "WebService" , "WebServiceProvider" , "WebServiceClient" ] )
3129 )
3230 }
3331
3432 /** Gets a method annotated with `@WebMethod` or `@WebEndpoint`. */
3533 Callable getARemoteMethod ( ) {
3634 result = this .getACallable ( ) and
3735 exists ( AnnotationType a | a = result .getAnAnnotation ( ) .getType ( ) |
38- a .hasName ( "WebMethod" ) or
39- a .hasName ( "WebEndpoint" )
36+ a .hasName ( [ "WebMethod" , "WebEndpoint" ] )
4037 )
4138 }
4239}
@@ -62,12 +59,7 @@ class JaxRsResourceMethod extends Method {
6259 a = this .getAnAnnotation ( ) .getType ( ) and
6360 a .getPackage ( ) .getName ( ) = getAJaxRsPackage ( )
6461 |
65- a .hasName ( "GET" ) or
66- a .hasName ( "POST" ) or
67- a .hasName ( "DELETE" ) or
68- a .hasName ( "PUT" ) or
69- a .hasName ( "OPTIONS" ) or
70- a .hasName ( "HEAD" )
62+ a .hasName ( [ "GET" , "POST" , "DELETE" , "PUT" , "OPTIONS" , "HEAD" ] )
7163 )
7264 or
7365 // A JaxRS resource method can also inherit these annotations from a supertype, but only if
@@ -201,13 +193,10 @@ class JaxRsInjectionAnnotation extends JaxRSAnnotation {
201193 a = this .getType ( ) and
202194 a .getPackage ( ) .getName ( ) = getAJaxRsPackage ( )
203195 |
204- a .hasName ( "BeanParam" ) or
205- a .hasName ( "CookieParam" ) or
206- a .hasName ( "FormParam" ) or
207- a .hasName ( "HeaderParam" ) or
208- a .hasName ( "MatrixParam" ) or
209- a .hasName ( "PathParam" ) or
210- a .hasName ( "QueryParam" )
196+ a .hasName ( [
197+ "BeanParam" , "CookieParam" , "FormParam" , "HeaderParam" , "MatrixParam" , "PathParam" ,
198+ "QueryParam"
199+ ] )
211200 )
212201 or
213202 this .getType ( ) .hasQualifiedName ( getAJaxRsPackage ( "core" ) , "Context" )
0 commit comments