java.lang.Object
io.helidon.declarative.codegen.http.HttpFields
Helper methods for common HTTP constants and fields.
-
Method Summary
Modifier and TypeMethodDescriptionstatic String
ensureHeaderNameConstant
(FieldHandler fieldHandler, String headerName) Ensure a header name constant.static String
ensureHeaderValueConstant
(FieldHandler fieldHandler, HeaderValue headerValue) Ensure a header value constant.static String
ensureHttpMediaTypeConstant
(FieldHandler fieldHandler, String mediaType) Ensure HTTP Media Type constant.static String
ensureHttpMethodConstant
(FieldHandler fieldHandler, String httpMethod) Ensure an HTTP method constant.static String
ensureHttpStatusConstant
(FieldHandler fieldHandler, HttpStatus httpStatus) Ensure an HTTP status constant.
-
Method Details
-
ensureHeaderNameConstant
Ensure a header name constant.- Parameters:
fieldHandler
- handler for the processed typeheaderName
- name of the header to add- Returns:
- constant name for the header name
-
ensureHeaderValueConstant
Ensure a header value constant.- Parameters:
fieldHandler
- handler for the processed typeheaderValue
- header value information- Returns:
- constant name for the header value
-
ensureHttpMediaTypeConstant
Ensure HTTP Media Type constant.- Parameters:
fieldHandler
- handler for the processed typemediaType
- HTTP media type string- Returns:
- constant name for the HTTP media type
-
ensureHttpMethodConstant
Ensure an HTTP method constant.- Parameters:
fieldHandler
- handler for the processed typehttpMethod
- name of the HTTP Method- Returns:
- constant name for the HTTP method
-
ensureHttpStatusConstant
Ensure an HTTP status constant.- Parameters:
fieldHandler
- handler for the processed typehttpStatus
- HTTP status information- Returns:
- constant name for the HTTP status
-