smartinspectpython.sitokenfactory
Module: sitokenfactory.py
Revision History
Date | Version | Description |
---|---|---|
2023/05/30 | 3.0.0.0 | Initial Version. |
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.
Threadsafety:
This class is not guaranteed to be thread-safe.
Creates a LiteralToken instance.
Arguments:
- value (str): The value to assign to the literal token.
Returns:
A LiteralToken object with the value assigned.
Creates instance of Token subclasses.
Arguments:
- value (str): The original string representation of the token.
Returns:
An appropriate Token object for the given string representation of a token.
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 SIPatternParser class, especially the SIPatternParser.Pattern property.