Package ro.sync.syntaxhighlight.marker
Class TokenMarkerFactory
java.lang.Object
ro.sync.syntaxhighlight.marker.TokenMarkerFactory
Factory for the TokenMarkers.
-
Method Summary
Modifier and TypeMethodDescriptionGet the content types to markers map.static boolean
hasMarkerFor
(String contentType) See if there is a marker for the content type.static boolean
isJSONTokenMarker
(ro.sync.syntaxhighlight.marker.TokenMarker tokenMarker) Check if the provided token marker is a JSON tokenMarker.static boolean
isXmlTokenMarker
(ro.sync.syntaxhighlight.marker.TokenMarker tokenMarker) Check if the provided token marker is an XML tokenMarkerstatic boolean
isYAMLTokenMarker
(ro.sync.syntaxhighlight.marker.TokenMarker tokenMarker) Check if the provided token marker is a YAML tokenMarker.static ro.sync.syntaxhighlight.marker.TokenMarker
newTokenMarker
(String contentType) Creates a new token marker for the specified content type.
-
Method Details
-
getContentTypesToMarkersMap
Get the content types to markers map.- Returns:
- The map with markers.
-
newTokenMarker
Creates a new token marker for the specified content type.- Parameters:
contentType
- The content type. It can be: "text/xml", "text/xsl", "text/wsdl", "text/xsd", "text/dtd", "text/rng", "text/plain", "text/java", "text/javascript", "text/c", "text/cc", "text/batch", "text/shell", "text/properties", "text/sql", "text/php", "text/perl, "text/css"", "text/python", "text/xquery", "text/xpath", "text/markdown".- Returns:
- A token marker for that content type, or
null
if there is none.
-
hasMarkerFor
See if there is a marker for the content type.- Parameters:
contentType
- The content type.- Returns:
- True if has marker for that content type.
-
isXmlTokenMarker
public static boolean isXmlTokenMarker(ro.sync.syntaxhighlight.marker.TokenMarker tokenMarker) Check if the provided token marker is an XML tokenMarker- Parameters:
tokenMarker
- to be checked- Returns:
true
if the specified tokenMarker is an XML tokenMarker
-
isJSONTokenMarker
public static boolean isJSONTokenMarker(ro.sync.syntaxhighlight.marker.TokenMarker tokenMarker) Check if the provided token marker is a JSON tokenMarker.- Parameters:
tokenMarker
- The token marker to be checked- Returns:
true
if the specified tokenMarker is a JSON tokenMarker
-
isYAMLTokenMarker
public static boolean isYAMLTokenMarker(ro.sync.syntaxhighlight.marker.TokenMarker tokenMarker) Check if the provided token marker is a YAML tokenMarker.- Parameters:
tokenMarker
- The token marker to be checked- Returns:
true
if the specified tokenMarker is a YAML tokenMarker
-