Class TokenFactory


  • public class TokenFactory
    extends Object
    Creates instances of Token subclasses.

    This class has only one public method called getToken, which is capable of creating Token objects depending on the given argument. It is important to note that this class is not guaranteed to be thread safe.

    • Constructor Detail

      • TokenFactory

        public TokenFactory()
    • Method Detail

      • getToken

        public static Token getToken​(String value)
        Creates instance of Token subclasses. This method analyzes and parses the supplied representation of a token and creates an appropriate Token object. For example, if the value argument is set to "%session%", a Token object is created and returned which is responsible for expanding the %session% variable. For a list of available tokens and a detailed description, please have a look at the PatternParser class, especially the PatternParser.setPattern method.
        Parameters:
        value - The original string representation of the token
        Returns:
        An appropriate Token object for the given string representation of a token