AbstractTokenMakerFactory
Date: 2017-02-11

org.fife.ui.rsyntaxtextarea

## Class AbstractTokenMakerFactory

- java.lang.Object
- - org.fife.ui.rsyntaxtextarea.TokenMakerFactory
  - - org.fife.ui.rsyntaxtextarea.AbstractTokenMakerFactory

-     public abstract class AbstractTokenMakerFactory
      extends TokenMakerFactory

  Base class for `TokenMakerFactory` implementations. A mapping from language keys to the names of `TokenMaker` classes is stored.

- - ### Field Summary

    - ### Fields inherited from class org.fife.ui.rsyntaxtextarea.TokenMakerFactory

      `PROPERTY_DEFAULT_TOKEN_MAKER_FACTORY`

  - ### Constructor Summary

    Constructors
    Modifier | Constructor and Description
    --- | ---
    `protected` | `AbstractTokenMakerFactory()` Constructor.

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `protected TokenMaker` | `getTokenMakerImpl(java.lang.String key)` Returns a `TokenMaker` for the specified key.
    `protected abstract void` | `initTokenMakerMap()` Populates the mapping from keys to instances of `TokenMakerCreator`s.
    `java.util.Set<java.lang.String>` | `keySet()` Returns the set of keys that this factory maps to token makers.
    `void` | `putMapping(java.lang.String key, java.lang.String className)` Adds a mapping from a key to a `TokenMaker` implementation class name.
    `void` | `putMapping(java.lang.String key, java.lang.String className, java.lang.ClassLoader cl)` Adds a mapping from a key to a `TokenMaker` implementation class name.

    - ### Methods inherited from class org.fife.ui.rsyntaxtextarea.TokenMakerFactory

      `getDefaultInstance, getTokenMaker, setDefaultInstance`

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

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

- - ### Constructor Detail

    - #### AbstractTokenMakerFactory

          protected AbstractTokenMakerFactory()

      Constructor.

  - ### Method Detail

    - #### getTokenMakerImpl

          protected TokenMaker getTokenMakerImpl(java.lang.String key)

      Returns a `TokenMaker` for the specified key.
      Specified by:
        `getTokenMakerImpl` in class `TokenMakerFactory`
      Parameters:
        `key` - The key.
      Returns:
        The corresponding `TokenMaker`, or `null` if none matches the specified key.

    - #### initTokenMakerMap

          protected abstract void initTokenMakerMap()

      Populates the mapping from keys to instances of `TokenMakerCreator`s. Subclasses should override this method and call one of the `putMapping` overloads to register `TokenMaker`s for syntax constants.
      See Also:
        `putMapping(String, String)`, `putMapping(String, String, ClassLoader)`

    - #### keySet

          public java.util.Set<java.lang.String> keySet()

      Returns the set of keys that this factory maps to token makers.
      Specified by:
        `keySet` in class `TokenMakerFactory`
      Returns:
        The set of keys.

    - #### putMapping

          public void putMapping(java.lang.String key,
                        java.lang.String className)

      Adds a mapping from a key to a `TokenMaker` implementation class name.
      Parameters:
        `key` - The key.
        `className` - The `TokenMaker` class name.
      See Also:
        `putMapping(String, String, ClassLoader)`

    - #### putMapping

          public void putMapping(java.lang.String key,
                        java.lang.String className,
                        java.lang.ClassLoader cl)

      Adds a mapping from a key to a `TokenMaker` implementation class name.
      Parameters:
        `key` - The key.
        `className` - The `TokenMaker` class name.
        `cl` - The class loader to use when loading the class.
      See Also:
        `putMapping(String, String)`