Class RestEndpointModel


  • public class RestEndpointModel
    extends Object
    A model representing the endpoint specified by a method contains a path and a request method
    Author:
    Matt Gill
    • Method Detail

      • generateFromMethod

        public static RestEndpointModel generateFromMethod​(Method method)
        Gets the endpoint of a given method, relative to the jersey application root. Will return an endpoint path with a leading slash but no trailing slashes (e.g. /test/path/{name})
        Parameters:
        method - the method to parse
        Returns:
        a RestEndpointModel specific to the method
      • getPath

        public String getPath()
        Returns:
        the path of the endpoint.
      • getRequestMethod

        public String getRequestMethod()
        Returns:
        the HttpMethod of the endpoint.