XModeHandler (jEdit API Documentation)

Package org.gjt.sp.jedit.syntax

## Class XModeHandler

- java.lang.Object
- - org.xml.sax.helpers.DefaultHandler
  - - org.gjt.sp.jedit.syntax.XModeHandler

- All Implemented Interfaces:
    `org.xml.sax.ContentHandler`, `org.xml.sax.DTDHandler`, `org.xml.sax.EntityResolver`, `org.xml.sax.ErrorHandler`

      public abstract class XModeHandler
      extends org.xml.sax.helpers.DefaultHandler

  XML handler for mode definition files.

- - ### Constructor Summary

    Constructors
    Constructor | Description
    --- | ---
    `XModeHandler​(java.lang.String modeName)` |

  - ### Method Summary

    All Methods Instance Methods Abstract Methods Concrete Methods
    Modifier and Type | Method | Description
    --- | --- | ---
    `void` | `characters​(char[] c, int off, int len)` |
    `void` | `endDocument()` |
    `void` | `endElement​(java.lang.String uri, java.lang.String localName, java.lang.String name)` |
    `protected abstract void` | `error​(java.lang.String msg, java.lang.Object subst)` | Reports an error.
    `java.util.Hashtable<java.lang.String,​java.lang.String>` | `getModeProperties()` |
    `TokenMarker` | `getTokenMarker()` | Returns the TokenMarker.
    `protected abstract TokenMarker` | `getTokenMarker​(java.lang.String mode)` | Returns the token marker for the given mode.
    `org.xml.sax.InputSource` | `resolveEntity​(java.lang.String publicId, java.lang.String systemId)` |
    `void` | `startDocument()` |
    `void` | `startElement​(java.lang.String uri, java.lang.String localName, java.lang.String qName, org.xml.sax.Attributes attrs)` |

    - ### Methods inherited from class org.xml.sax.helpers.DefaultHandler

      `endPrefixMapping, error, fatalError, ignorableWhitespace, notationDecl, processingInstruction, setDocumentLocator, skippedEntity, startPrefixMapping, unparsedEntityDecl, warning`

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

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

- - ### Constructor Detail

    - #### XModeHandler

          public XModeHandler​(java.lang.String modeName)

  - ### Method Detail

    - #### resolveEntity

          public org.xml.sax.InputSource resolveEntity​(java.lang.String publicId,
                                                       java.lang.String systemId)

      Specified by:
        `resolveEntity` in interface `org.xml.sax.EntityResolver`
      Overrides:
        `resolveEntity` in class `org.xml.sax.helpers.DefaultHandler`

    - #### characters

          public void characters​(char[] c,
                                 int off,
                                 int len)

      Specified by:
        `characters` in interface `org.xml.sax.ContentHandler`
      Overrides:
        `characters` in class `org.xml.sax.helpers.DefaultHandler`

    - #### startElement

          public void startElement​(java.lang.String uri,
                                   java.lang.String localName,
                                   java.lang.String qName,
                                   org.xml.sax.Attributes attrs)

      Specified by:
        `startElement` in interface `org.xml.sax.ContentHandler`
      Overrides:
        `startElement` in class `org.xml.sax.helpers.DefaultHandler`

    - #### endElement

          public void endElement​(java.lang.String uri,
                                 java.lang.String localName,
                                 java.lang.String name)

      Specified by:
        `endElement` in interface `org.xml.sax.ContentHandler`
      Overrides:
        `endElement` in class `org.xml.sax.helpers.DefaultHandler`

    - #### startDocument

          public void startDocument()

      Specified by:
        `startDocument` in interface `org.xml.sax.ContentHandler`
      Overrides:
        `startDocument` in class `org.xml.sax.helpers.DefaultHandler`

    - #### endDocument

          public void endDocument()

      Specified by:
        `endDocument` in interface `org.xml.sax.ContentHandler`
      Overrides:
        `endDocument` in class `org.xml.sax.helpers.DefaultHandler`

    - #### getTokenMarker

          public TokenMarker getTokenMarker()

      Returns the TokenMarker.
      Returns:
        a TokenMarker it cannot be null

    - #### getModeProperties

          public java.util.Hashtable<java.lang.String,​java.lang.String> getModeProperties()

    - #### error

          protected abstract void error​(java.lang.String msg,
                                        java.lang.Object subst)

      Reports an error. You must override this method so that the mode loader can do error reporting.
      Parameters:
        `msg` - The error type
        `subst` - A `String` or a `Throwable` containing specific information
      Since:
        jEdit 4.2pre1

    - #### getTokenMarker

          protected abstract TokenMarker getTokenMarker​(java.lang.String mode)

      Returns the token marker for the given mode. You must override this method so that the mode loader can resolve delegate targets.
      Parameters:
        `mode` - The mode name
      Since:
        jEdit 4.2pre1