Class KeywordToken

java.lang.Object
net.apartium.cocoabeans.commands.lexer.CommandToken
net.apartium.cocoabeans.commands.lexer.KeywordToken
All Implemented Interfaces:
Serializable
Direct Known Subclasses:
SimpleKeywordToken

@AvailableSince("0.0.37") public abstract class KeywordToken extends CommandToken
A Keyword token that represents an keyword
See Also:
  • Constructor Details

    • KeywordToken

      protected KeywordToken(int from, int to, String text)
      Create a new keyword token
      Parameters:
      from - starting index
      to - ending index
      text - the entire text of command
  • Method Details

    • getType

      public CommandTokenType getType()
      Get the type of the token
      Specified by:
      getType in class CommandToken
      Returns:
      CommandTokenType.KEYWORD
    • getKeyword

      public abstract String getKeyword()
      Get the keyword
      Returns:
      the keyword