private String computeRequestMethod ( Element e ) { for ( AnnotationMirror am : e . getAnnotationMirrors ( ) ) { final String typeString = am . getAnnotationType ( ) . toString ( ) ; if ( typeString . endsWith ( ".GET" ) ) { return "GET" ; } else if ( typeString . endsWith ( ".PUT" ) ) { return "PUT" ; } else if ( typeString . endsWith ( ".POST" ) ) { return "POST" ; } else if ( typeString . endsWith ( ".PATCH" ) ) { return "PATCH" ; } else if ( typeString . endsWith ( ".DELETE" ) ) { return "DELETE" ; } } return null ; }
Find the request method annotation the method was annotated with and return a string representing the request method .