Class TokenMakerFactory

  • Direct Known Subclasses:
    AbstractTokenMakerFactory

    public abstract class TokenMakerFactory
    extends Object
    A factory that maps syntax styles to TokenMakers capable of splitting text into tokens for those syntax styles.
    • Field Detail

      • PROPERTY_DEFAULT_TOKEN_MAKER_FACTORY

        public static final String PROPERTY_DEFAULT_TOKEN_MAKER_FACTORY
        If this system property is set, a custom TokenMakerFactory of the specified class will be used as the default token maker factory.
        See Also:
        Constant Field Values
    • Constructor Detail

      • TokenMakerFactory

        public TokenMakerFactory()
    • Method Detail

      • getTokenMaker

        public final TokenMaker getTokenMaker​(String key)
        Returns a TokenMaker for the specified key.
        Parameters:
        key - The key.
        Returns:
        The corresponding TokenMaker, or PlainTextTokenMaker if none matches the specified key.
      • getTokenMakerImpl

        protected abstract TokenMaker getTokenMakerImpl​(String key)
        Returns a TokenMaker for the specified key.
        Parameters:
        key - The key.
        Returns:
        The corresponding TokenMaker, or null if none matches the specified key.
      • keySet

        public abstract Set<String> keySet()
        Returns the set of keys that this factory maps to token makers.
        Returns:
        The set of keys.