org.springframework.cloud.dataflow.shell.converter

## Class MediaTypeConverter

- java.lang.Object
- - org.springframework.cloud.dataflow.shell.converter.MediaTypeConverter

- All Implemented Interfaces:
    org.springframework.shell.core.Converter<org.springframework.http.MediaType>

      @Component
      public class MediaTypeConverter
      extends Object
      implements org.springframework.shell.core.Converter<org.springframework.http.MediaType>

  Knows how to parse String representations of `MediaType`.
  Author:
    Eric Bottard

- - ### Field Summary

    - ### Fields inherited from interface org.springframework.shell.core.Converter

      `TAB_COMPLETION_COUNT_PREFIX`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `MediaTypeConverter()`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `org.springframework.http.MediaType` | `convertFromText(String value, Class<?> targetType, String optionContext)`
    `boolean` | `getAllPossibleValues(List<org.springframework.shell.core.Completion> completions, Class<?> targetType, String existingData, String optionContext, org.springframework.shell.core.MethodTarget target)`
    `boolean` | `supports(Class<?> type, String optionContext)`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### MediaTypeConverter

          public MediaTypeConverter()

  - ### Method Detail

    - #### supports

          public boolean supports(Class<?> type,
                                  String optionContext)

      Specified by:
        `supports` in interface `org.springframework.shell.core.Converter<org.springframework.http.MediaType>`

    - #### convertFromText

          public org.springframework.http.MediaType convertFromText(String value,
                                                                    Class<?> targetType,
                                                                    String optionContext)

      Specified by:
        `convertFromText` in interface `org.springframework.shell.core.Converter<org.springframework.http.MediaType>`

    - #### getAllPossibleValues

          public boolean getAllPossibleValues(List<org.springframework.shell.core.Completion> completions,
                                              Class<?> targetType,
                                              String existingData,
                                              String optionContext,
                                              org.springframework.shell.core.MethodTarget target)

      Specified by:
        `getAllPossibleValues` in interface `org.springframework.shell.core.Converter<org.springframework.http.MediaType>`

Copyright © 2021 Pivotal Software, Inc.. All rights reserved.