java.lang.Object
io.helidon.declarative.codegen.http.HttpFields

public final class HttpFields extends Object
Helper methods for common HTTP constants and fields.
  • Method Details

    • ensureHeaderNameConstant

      public static String ensureHeaderNameConstant(FieldHandler fieldHandler, String headerName)
      Ensure a header name constant.
      Parameters:
      fieldHandler - handler for the processed type
      headerName - name of the header to add
      Returns:
      constant name for the header name
    • ensureHeaderValueConstant

      public static String ensureHeaderValueConstant(FieldHandler fieldHandler, HeaderValue headerValue)
      Ensure a header value constant.
      Parameters:
      fieldHandler - handler for the processed type
      headerValue - header value information
      Returns:
      constant name for the header value
    • ensureHttpMediaTypeConstant

      public static String ensureHttpMediaTypeConstant(FieldHandler fieldHandler, String mediaType)
      Ensure HTTP Media Type constant.
      Parameters:
      fieldHandler - handler for the processed type
      mediaType - HTTP media type string
      Returns:
      constant name for the HTTP media type
    • ensureHttpMethodConstant

      public static String ensureHttpMethodConstant(FieldHandler fieldHandler, String httpMethod)
      Ensure an HTTP method constant.
      Parameters:
      fieldHandler - handler for the processed type
      httpMethod - name of the HTTP Method
      Returns:
      constant name for the HTTP method
    • ensureHttpStatusConstant

      public static String ensureHttpStatusConstant(FieldHandler fieldHandler, HttpStatus httpStatus)
      Ensure an HTTP status constant.
      Parameters:
      fieldHandler - handler for the processed type
      httpStatus - HTTP status information
      Returns:
      constant name for the HTTP status