Enum MethodType
- java.lang.Object
-
- java.lang.Enum<MethodType>
-
- com.aspectran.core.context.rule.type.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 ofMethodType
with a value represented by the specifiedString
.static MethodType
resolve(java.lang.String methodType)
Returns aMethodType
with a value represented by the specifiedString
.static java.lang.String
stringify(MethodType[] types)
Converts an array ofMethodType
to a comma separatedString
.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.
-
-
-
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.
-
TRACE
public static final MethodType TRACE
-
-
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 namejava.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 aMethodType
with a value represented by the specifiedString
.- Parameters:
methodType
- the method type as aString
- Returns:
- a
MethodType
, may benull
-
parse
public static MethodType[] parse(java.lang.String value)
Returns an array ofMethodType
with a value represented by the specifiedString
.- Parameters:
value
- the method type as aString
- Returns:
- a
MethodType
, may benull
-
stringify
public static java.lang.String stringify(MethodType[] types)
Converts an array ofMethodType
to a comma separatedString
.- Parameters:
types
- an array ofMethodType
- Returns:
- a comma separated
String
-
-