Class TypedArgumentToken<T>
java.lang.Object
com.symphony.bdk.core.activity.parsing.TypedArgumentToken<T>
- All Implemented Interfaces:
ArgumentCommandToken
,CommandToken
@API(status=INTERNAL)
public class TypedArgumentToken<T>
extends Object
implements ArgumentCommandToken
Command token matching a specific type and put in a given argument.
-
Method Summary
Modifier and TypeMethodDescriptionClass<?>
boolean
static <T> TypedArgumentToken<T>
newInstance
(Class<T> type, String pattern)
-
Method Details
-
newInstance
- Type Parameters:
T
- the type to be checked for matching- Parameters:
type
- the type to be checked for matchingpattern
- the pattern in format "{@argName}", "{$argName}" or "{#argName}"- Returns:
- a new instance
-
getArgumentName
- Specified by:
getArgumentName
in interfaceArgumentCommandToken
- Returns:
- the argument name.
-
matches
-
getTokenType
- Specified by:
getTokenType
in interfaceCommandToken
- Returns:
- the actual type accepted by this token:
String
,Mention
,Cashtag
orHashtag
-