Class TokenGeneratorProvider


  • public class TokenGeneratorProvider
    extends Object
    A provider of a token generator according to the type of tokens to generate. A token isn't simply just an atom or a symbol. It has a type that is related to the way it is used. Because the use of tokens differ, their value (the atom) cannot follow the same pattern and therefore they have to be generated in the way that matches their use. It is why the tokens differ by their type and their generation is related to their type.
    Author:
    mmoquillon
    • Method Detail

      • getTokenGenerator

        public static TokenGenerator getTokenGenerator​(Class<? extends Token> type)
        Gets the generator mapped with the specified token type.
        Parameters:
        type - the type of the token.
        Returns:
        the token generator mapped with the specified token type.
        Throws:
        TokenGenerationException - if the token generator cannot be obtained.