Object MimeType.Known
-
- All Implemented Interfaces:
public class MimeType.Known
-
-
Field Summary
Fields Modifier and Type Field Description private final MimeTypeKOTLINprivate final MimeTypeJAVAprivate final MimeTypeTEXTprivate final MimeTypeUNKNOWNprivate final MimeTypeXMLprivate final MimeTypePROPERTIESprivate final MimeTypeTOMLprivate final MimeTypeJSONprivate final MimeTypeREGEXprivate final MimeTypeGROOVYprivate final MimeTypeCprivate final MimeTypeCPPprivate final MimeTypeSVGprivate final MimeTypeAIDLprivate final MimeTypePROTOprivate final MimeTypeSQLprivate final MimeTypePROGUARDprivate final MimeTypePYTHONprivate final MimeTypeJAVASCRIPTprivate final MimeTypeTYPESCRIPTprivate final MimeTypeDARTprivate final MimeTypeRUSTprivate final MimeTypeAGSLprivate final MimeTypeSHELLprivate final MimeTypeYAMLprivate final MimeTypeGOprivate final MimeTypeRESOURCEprivate final MimeTypeMANIFESTprivate final MimeTypeGRADLEprivate final MimeTypeGRADLE_KTSprivate final MimeTypeVERSION_CATALOGprivate final MimeTypeDIFFprivate final MimeTypePATCHpublic final static MimeType.KnownINSTANCE
-
Method Summary
Modifier and Type Method Description final MimeTypefromMarkdownLanguageName(String name)Maps from a markdown language name back to a mime type. final MimeTypegetKOTLIN()Well known name for Kotlin source snippets. final MimeTypegetJAVA()Well known name for Java source snippets. final MimeTypegetTEXT()Well known mime type for text files. final MimeTypegetUNKNOWN()Special marker mimetype for unknown or unspecified mime types. final MimeTypegetXML()Well known name for XML source snippets. final MimeTypegetPROPERTIES()final MimeTypegetTOML()final MimeTypegetJSON()final MimeTypegetREGEX()final MimeTypegetGROOVY()final MimeTypegetC()final MimeTypegetCPP()final MimeTypegetSVG()final MimeTypegetAIDL()final MimeTypegetPROTO()final MimeTypegetSQL()final MimeTypegetPROGUARD()final MimeTypegetPYTHON()final MimeTypegetJAVASCRIPT()final MimeTypegetTYPESCRIPT()final MimeTypegetDART()final MimeTypegetRUST()final MimeTypegetAGSL()final MimeTypegetSHELL()final MimeTypegetYAML()final MimeTypegetGO()final MimeTypegetRESOURCE()Note that most resource files will also have a folder type, so don't use equality on this mime type final MimeTypegetMANIFEST()final MimeTypegetGRADLE()final MimeTypegetGRADLE_KTS()final MimeTypegetVERSION_CATALOG()final MimeTypegetDIFF()final MimeTypegetPATCH()-
-
Method Detail
-
fromMarkdownLanguageName
final MimeType fromMarkdownLanguageName(String name)
Maps from a markdown language name back to a mime type.
-
getKOTLIN
final MimeType getKOTLIN()
Well known name for Kotlin source snippets. This is the base mime type; consider using isKotlin instead to check if a mime type represents Kotlin code such that it also picks up
build.gradle.ktsfiles (which carry extra attributes in the mime type; see GRADLE_KTS.)
-
getUNKNOWN
final MimeType getUNKNOWN()
Special marker mimetype for unknown or unspecified mime types. These will generally be treated as TEXT for editor purposes. (The standard "unknown" mime type is application/octet-stream (from RFC 2046) but we know this isn't binary data; it's text.)
Note that MimeType is generally nullable in places where it's optional instead of being set to this value, but this mime type is there for places where we need a specific value to point to.
-
getXML
final MimeType getXML()
Well known name for XML source snippets. This is the base mime type; consider using isXml instead to check if a mime type represents any XML such that it also picks up manifest files, resource files etc., which all carry extra attributes in the mime type; see for example MANIFEST and RESOURCE.
-
getPROPERTIES
final MimeType getPROPERTIES()
-
getPROGUARD
final MimeType getPROGUARD()
-
getJAVASCRIPT
final MimeType getJAVASCRIPT()
-
getTYPESCRIPT
final MimeType getTYPESCRIPT()
-
getRESOURCE
final MimeType getRESOURCE()
Note that most resource files will also have a folder type, so don't use equality on this mime type
-
getMANIFEST
final MimeType getMANIFEST()
-
getGRADLE_KTS
final MimeType getGRADLE_KTS()
-
getVERSION_CATALOG
final MimeType getVERSION_CATALOG()
-
-
-
-