corelib.tools.languages.parsers
Class Token

java.lang.Object
  extended by corelib.tools.languages.parsers.Token

public class Token
extends java.lang.Object

This class is used for store a Javascript syntaxic token.

Since:
0.3.0
Author:
Dominique Liard & Alexia Ramaļoli

Constructor Summary
Token(TokenType type, java.lang.String content)
          Class constructor.
 
Method Summary
 java.lang.String getContent()
          Returns the text content of this token.
 TokenType getType()
          Returns the type of this token.
 boolean isKeyword()
          Checks if this token is a keyword.
 void setContent(java.lang.String content)
          Changes the text content of this token.
 void setType(TokenType type)
          Changes the type of this token.
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Token

public Token(TokenType type,
             java.lang.String content)
Class constructor.

Parameters:
type - Identify the type of this token.
content - The javascript text of this token.
Method Detail

getContent

public java.lang.String getContent()
Returns the text content of this token.

Returns:
The text content of this token.

setContent

public void setContent(java.lang.String content)
Changes the text content of this token.

Parameters:
content - The new text content of this token.

getType

public TokenType getType()
Returns the type of this token.

Returns:
The type of this token.
See Also:
TokenType

setType

public void setType(TokenType type)
Changes the type of this token.

Parameters:
type - The new type of this token.

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object

isKeyword

public boolean isKeyword()
Checks if this token is a keyword.

Returns:
true if this token is a keyword, false otherwise.


CAUTION: Ellipse is proposed to you in BETA version to allow evaluation of this framework. Infini Software is released from any responsibility for the use of Ellipse Framework.

Copyright 2012 Infini Software - All Rights Reserved.