Enum Class ResourcePathDeclaration.ComponentType
java.lang.Object
java.lang.Enum<ResourcePathDeclaration.ComponentType>
com.soklet.core.ResourcePathDeclaration.ComponentType
- All Implemented Interfaces:
Serializable
,Comparable<ResourcePathDeclaration.ComponentType>
,Constable
- Enclosing class:
ResourcePathDeclaration
public static enum ResourcePathDeclaration.ComponentType
extends Enum<ResourcePathDeclaration.ComponentType>
How to interpret a
ResourcePathDeclaration.Component
of a ResourcePathDeclaration
- is it literal text or a placeholder?
For example, given the path declaration /languages/{languageId}
:
ComponentType
at index 0 would beLITERAL
ComponentType
at index 1 would bePLACEHOLDER
Note: this type is not normally used by Soklet applications unless they choose to implement a custom ResourceMethodResolver
.
- Author:
- Mark Allen
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>>
-
Enum Constant Summary
Enum ConstantsEnum ConstantDescriptionA literal component of a resource path declaration.A placeholder component (that is, one whose value is provided at runtime) of a resource path declaration. -
Method Summary
Modifier and TypeMethodDescriptionReturns the enum constant of this class with the specified name.values()
Returns an array containing the constants of this enum class, in the order they are declared.Methods inherited from class java.lang.Enum
compareTo, describeConstable, equals, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
-
Enum Constant Details
-
LITERAL
A literal component of a resource path declaration.For example, given resource path declaration
/users/{userId}
, theusers
component would be of typeLITERAL
. -
PLACEHOLDER
A placeholder component (that is, one whose value is provided at runtime) of a resource path declaration.For example, given resource path declaration
/users/{userId}
, theuserId
component would be of typePLACEHOLDER
.
-
-
Method Details
-
values
Returns an array containing the constants of this enum class, in the order they are declared.- Returns:
- an array containing the constants of this enum class, in the order they are declared
-
valueOf
Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (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:
IllegalArgumentException
- if this enum class has no constant with the specified nameNullPointerException
- if the argument is null
-