Enum MethodType

  • All Implemented Interfaces:
    java.io.Serializable, java.lang.Comparable<MethodType>

    public enum MethodType
    extends java.lang.Enum<MethodType>
    Supported Method types.

    Created: 2008. 03. 26 AM 12:58:38

    • Enum Constant Summary

      Enum Constants 
      Enum Constant Description
      DELETE
      deletes a resource.
      GET
      retrieves a representation of a resource without side-effects (nothing changes on the server).
      HEAD
      retrieves just the resource meta-information (headers) i.e.
      OPTIONS
      returns the actions supported for specified the resource - also without side-effects.
      PATCH
      partial modification of a resource.
      POST
      creates a resource.
      PUT
      (completely) replaces an existing resource.
      TRACE  
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      boolean containsTo​(MethodType[] types)  
      boolean matches​(java.lang.String type)  
      static MethodType[] parse​(java.lang.String value)
      Returns an array of MethodType with a value represented by the specified String.
      static MethodType resolve​(java.lang.String methodType)
      Returns a MethodType with a value represented by the specified String.
      static java.lang.String stringify​(MethodType[] types)
      Converts an array of MethodType to a comma separated String.
      static MethodType valueOf​(java.lang.String name)
      Returns the enum constant of this type with the specified name.
      static MethodType[] values()
      Returns an array containing the constants of this enum type, in the order they are declared.
      • Methods inherited from class java.lang.Enum

        clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
      • Methods inherited from class java.lang.Object

        getClass, notify, notifyAll, wait, wait, wait
    • Enum Constant Detail

      • GET

        public static final MethodType GET
        retrieves a representation of a resource without side-effects (nothing changes on the server).
      • POST

        public static final MethodType POST
        creates a resource.
      • PUT

        public static final MethodType PUT
        (completely) replaces an existing resource.
      • PATCH

        public static final MethodType PATCH
        partial modification of a resource.
      • DELETE

        public static final MethodType DELETE
        deletes a resource.
      • HEAD

        public static final MethodType HEAD
        retrieves just the resource meta-information (headers) i.e. same as GET but without the response body - also without side-effects.
      • OPTIONS

        public static final MethodType OPTIONS
        returns the actions supported for specified the resource - also without side-effects.
    • Method Detail

      • values

        public static MethodType[] values()
        Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:
        for (MethodType c : MethodType.values())
            System.out.println(c);
        
        Returns:
        an array containing the constants of this enum type, in the order they are declared
      • valueOf

        public static MethodType valueOf​(java.lang.String name)
        Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)
        Parameters:
        name - the name of the enum constant to be returned.
        Returns:
        the enum constant with the specified name
        Throws:
        java.lang.IllegalArgumentException - if this enum type has no constant with the specified name
        java.lang.NullPointerException - if the argument is null
      • containsTo

        public boolean containsTo​(MethodType[] types)
      • matches

        public boolean matches​(java.lang.String type)
      • resolve

        public static MethodType resolve​(java.lang.String methodType)
        Returns a MethodType with a value represented by the specified String.
        Parameters:
        methodType - the method type as a String
        Returns:
        a MethodType, may be null
      • parse

        public static MethodType[] parse​(java.lang.String value)
        Returns an array of MethodType with a value represented by the specified String.
        Parameters:
        value - the method type as a String
        Returns:
        a MethodType, may be null
      • stringify

        public static java.lang.String stringify​(MethodType[] types)
        Converts an array of MethodType to a comma separated String.
        Parameters:
        types - an array of MethodType
        Returns:
        a comma separated String