Class ResourcePathDeclaration.Component
java.lang.Object
com.soklet.ResourcePathDeclaration.Component
- Enclosing class:
ResourcePathDeclaration
Represents a
/-delimited part of a ResourcePathDeclaration.
For example, given the path declaration /languages/{languageId}:
Component0 would have typeLITERALand valuelanguagesComponent1 would have typePLACEHOLDERand valuelanguageId
You may obtain instances via the with(String, ComponentType) factory method.
Note: this type is not normally used by Soklet applications unless they choose to implement a custom ResourceMethodResolver.
- Author:
- Mark Allen
- See Also:
-
Method Details
-
with
@Nonnull public static ResourcePathDeclaration.Component with(@Nonnull String value, @Nonnull ResourcePathDeclaration.ComponentType type) - Parameters:
value- the value of this componenttype- the type of this component (literal or placeholder)- Returns:
- a
ResourcePathDeclaration.Componentinstance
-
toString
-
equals
-
hashCode
-
getValue
What is the value of this resource path declaration component?Note that the value of a
ResourcePathDeclaration.ComponentType.PLACEHOLDERcomponent does not include enclosing braces. For example, given the path declaration/languages/{languageId}, the component at index 1 would have valuelanguageId, not{languageId}.- Returns:
- the value of this component
-
getType
What type of resource path declaration component is this?- Returns:
- the type of component, e.g.
ResourcePathDeclaration.ComponentType.LITERALorResourcePathDeclaration.ComponentType.PLACEHOLDER
-