Interface Icon


public interface Icon
Represents an icon that can be associated with tools, resources, or prompts.
  • Method Details

    • src

      String src()
      Gets the source URI
      Returns:
      the icon source URI
    • mimeType

      Optional<String> mimeType()
      Gets the MIME type
      Returns:
      the MIME type of the icon
    • sizes

      List<String> sizes()
      Gets the sizes available for this icon
      Returns:
      the list of sizes, may be empty
    • theme

      The theme for this icon
      Returns:
      the theme
    • of

      static Icon of(String uri, String mimeType)
      Creates a new Icon.
      Parameters:
      uri - the icon URI
      mimeType - the icon MIME type
      Returns:
      the new icon
    • builder

      static Icon.Builder builder(String uri)
      Creates a builder for an Icon.
      Parameters:
      uri - the icon URI
      Returns:
      the new icon builder