Package com.gurock.smartinspect
Class TokenFactory
- java.lang.Object
-
- com.gurock.smartinspect.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 Summary
Constructors Constructor Description TokenFactory()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static TokengetToken(String value)Creates instance of Token subclasses.
-
-
-
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
-
-