Class TokenMarkerFactory

java.lang.Object
ro.sync.syntaxhighlight.marker.TokenMarkerFactory

@API(type=NOT_EXTENDABLE, src=PRIVATE) public final class TokenMarkerFactory extends Object
Factory for the TokenMarkers.
  • Method Summary

    Modifier and Type
    Method
    Description
    static com.google.common.collect.ImmutableMap<String,Class>
    Get 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 tokenMarker
    static 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.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Method Details

    • getContentTypesToMarkersMap

      public static com.google.common.collect.ImmutableMap<String,Class> getContentTypesToMarkersMap()
      Get the content types to markers map.
      Returns:
      The map with markers.
    • newTokenMarker

      public static ro.sync.syntaxhighlight.marker.TokenMarker newTokenMarker(String contentType)
      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

      public static boolean hasMarkerFor(String contentType)
      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