Java Doc for SQLToken.java in  » Database-Client » SQL-Workbench » workbench » sql » formatter » Java Source Code / Java DocumentationJava Source Code and Java Documentation

Java Source Code / Java Documentation
1. 6.0 JDK Core
2. 6.0 JDK Modules
3. 6.0 JDK Modules com.sun
4. 6.0 JDK Modules com.sun.java
5. 6.0 JDK Modules sun
6. 6.0 JDK Platform
7. Ajax
8. Apache Harmony Java SE
9. Aspect oriented
10. Authentication Authorization
11. Blogger System
12. Build
13. Byte Code
14. Cache
15. Chart
16. Chat
17. Code Analyzer
18. Collaboration
19. Content Management System
20. Database Client
21. Database DBMS
22. Database JDBC Connection Pool
23. Database ORM
24. Development
25. EJB Server geronimo
26. EJB Server GlassFish
27. EJB Server JBoss 4.2.1
28. EJB Server resin 3.1.5
29. ERP CRM Financial
30. ESB
31. Forum
32. GIS
33. Graphic Library
34. Groupware
35. HTML Parser
36. IDE
37. IDE Eclipse
38. IDE Netbeans
39. Installer
40. Internationalization Localization
41. Inversion of Control
42. Issue Tracking
43. J2EE
44. JBoss
45. JMS
46. JMX
47. Library
48. Mail Clients
49. Net
50. Parser
51. PDF
52. Portal
53. Profiler
54. Project Management
55. Report
56. RSS RDF
57. Rule Engine
58. Science
59. Scripting
60. Search Engine
61. Security
62. Sevlet Container
63. Source Control
64. Swing Library
65. Template Engine
66. Test Coverage
67. Testing
68. UML
69. Web Crawler
70. Web Framework
71. Web Mail
72. Web Server
73. Web Services
74. Web Services apache cxf 2.0.1
75. Web Services AXIS2
76. Wiki Engine
77. Workflow Engines
78. XML
79. XML UI
Java
Java Tutorial
Java Open Source
Jar File Download
Java Articles
Java Products
Java by API
Photoshop Tutorials
Maya Tutorials
Flash Tutorials
3ds-Max Tutorials
Illustrator Tutorials
GIMP Tutorials
C# / C Sharp
C# / CSharp Tutorial
C# / CSharp Open Source
ASP.Net
ASP.NET Tutorial
JavaScript DHTML
JavaScript Tutorial
JavaScript Reference
HTML / CSS
HTML CSS Reference
C / ANSI-C
C Tutorial
C++
C++ Tutorial
Ruby
PHP
Python
Python Tutorial
Python Open Source
SQL Server / T-SQL
SQL Server / T-SQL Tutorial
Oracle PL / SQL
Oracle PL/SQL Tutorial
PostgreSQL
SQL / MySQL
MySQL Tutorial
VB.Net
VB.Net Tutorial
Flash / Flex / ActionScript
VBA / Excel / Access / Word
XML
XML Tutorial
Microsoft Office PowerPoint 2007 Tutorial
Microsoft Office Excel 2007 Tutorial
Microsoft Office Word 2007 Tutorial
Java Source Code / Java Documentation » Database Client » SQL Workbench » workbench.sql.formatter 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


java.lang.Object
   workbench.sql.formatter.Token
      workbench.sql.formatter.SQLToken

SQLToken
public class SQLToken extends Token (Code)
A SQLToken is a token that is returned by a lexer that is lexing an SQL source file. It has several attributes describing the token: The type of token, the text of the token, the line number on which it occurred, the number of characters into the input at which it started, and similarly, the number of characters into the input at which it ended.


Field Summary
final public static  intCOMMENT_END_OF_LINE
     a -- to end of line comment.
final public static  intCOMMENT_TRADITIONAL
    
final public static  intERROR
    
final public static  intERROR_BAD_BIT_STRING
    
final public static  intERROR_UNCLOSED_BIT_STRING
    
final public static  intERROR_UNCLOSED_COMMENT
    
final public static  intERROR_UNCLOSED_STRING
    
final public static  intIDENTIFIER
    
final public static  intLITERAL_BIT_STRING
    
final public static  intLITERAL_FLOAT
    
final public static  intLITERAL_INTEGER
    
final public static  intLITERAL_STRING
    
final public static  intOPERATOR
    
final public static  intRESERVED_WORD
    
final public static  intSEPARATOR
    
final public static  intWHITE_SPACE
    

Constructor Summary
public  SQLToken(int ID, String contents, int lineNumber, int charBegin, int charEnd)
     Create a new token.
public  SQLToken(int ID, String text, int lineNumber, int charBegin, int charEnd, int state)
     Create a new token.

Method Summary
public  StringerrorString()
     get a String that explains the error, if this token is an error.
public  intgetCharBegin()
    
public  intgetCharEnd()
    
public  StringgetContents()
     Get the contents of this token.
public  StringgetDescription()
     A description of this token.
public  intgetID()
    
public  intgetLineNumber()
    
public  intgetState()
     Get an integer representing the state the tokenizer is in after returning this token. Those who are interested in incremental tokenizing for performance reasons will want to use this method to figure out where the tokenizer may be restarted.
public  StringgetText()
     Returned an uparsed version of the contents of this token.
public  booleanisComment()
     Checks this token to see if it is a comment.
public  booleanisError()
     Checks this token to see if it is an Error.
public  booleanisIdentifier()
     Checks this token to see if it is an identifier.
public  booleanisIntegerLiteral()
    
public  booleanisLiteral()
     Checks this token to see if it is a literal.
public  booleanisNumberLiteral()
    
public  booleanisOperator()
     Checks this token to see if it is a Operator.
public  booleanisReservedWord()
     Checks this token to see if it is a reserved word.
public  booleanisSeparator()
     Checks this token to see if it is a Separator.
public  booleanisWhiteSpace()
     Checks this token to see if it is White Space.
public  StringtoString()
     get a representation of this token as a human readable string.

Field Detail
COMMENT_END_OF_LINE
final public static int COMMENT_END_OF_LINE(Code)
a -- to end of line comment.



COMMENT_TRADITIONAL
final public static int COMMENT_TRADITIONAL(Code)
C style comment, (except possibly nested)



ERROR
final public static int ERROR(Code)
An error



ERROR_BAD_BIT_STRING
final public static int ERROR_BAD_BIT_STRING(Code)
An comment start embedded in an operator



ERROR_UNCLOSED_BIT_STRING
final public static int ERROR_UNCLOSED_BIT_STRING(Code)
An comment start embedded in an operator



ERROR_UNCLOSED_COMMENT
final public static int ERROR_UNCLOSED_COMMENT(Code)
An comment start embedded in an operator



ERROR_UNCLOSED_STRING
final public static int ERROR_UNCLOSED_STRING(Code)
An comment start embedded in an operator



IDENTIFIER
final public static int IDENTIFIER(Code)
A variable, name, or other identifier



LITERAL_BIT_STRING
final public static int LITERAL_BIT_STRING(Code)
A bit-string



LITERAL_FLOAT
final public static int LITERAL_FLOAT(Code)
A floating point



LITERAL_INTEGER
final public static int LITERAL_INTEGER(Code)
An integer



LITERAL_STRING
final public static int LITERAL_STRING(Code)
A string literal



OPERATOR
final public static int OPERATOR(Code)
An operator



RESERVED_WORD
final public static int RESERVED_WORD(Code)
A reserved word (keyword)



SEPARATOR
final public static int SEPARATOR(Code)
A separator



WHITE_SPACE
final public static int WHITE_SPACE(Code)
White space




Constructor Detail
SQLToken
public SQLToken(int ID, String contents, int lineNumber, int charBegin, int charEnd)(Code)
Create a new token. The constructor is typically called by the lexer
Parameters:
  ID - the id number of the token
Parameters:
  contents - A string representing the text of the token
Parameters:
  lineNumber - the line number of the input on which this token started
Parameters:
  charBegin - the offset into the input in characters at which this token started
Parameters:
  charEnd - the offset into the input in characters at which this token ended



SQLToken
public SQLToken(int ID, String text, int lineNumber, int charBegin, int charEnd, int state)(Code)
Create a new token. The constructor is typically called by the lexer
Parameters:
  ID - the id number of the token
Parameters:
  text - A string representing the text of the token
Parameters:
  lineNumber - the line number of the input on which this token started
Parameters:
  charBegin - the offset into the input in characters at which this token started
Parameters:
  charEnd - the offset into the input in characters at which this token ended
Parameters:
  state - the state the tokenizer is in after returning this token.




Method Detail
errorString
public String errorString()(Code)
get a String that explains the error, if this token is an error. a String that explains the error, if this token is an error, null otherwise.



getCharBegin
public int getCharBegin()(Code)
get the offset into the input in characters at which this token started the offset into the input in characters at which this token started



getCharEnd
public int getCharEnd()(Code)
get the offset into the input in characters at which this token ended the offset into the input in characters at which this token ended



getContents
public String getContents()(Code)
Get the contents of this token. Reserved words (keywords) will be returned in upper case and with multiple whitespaces replaced by a single whitespace to make comparisons easier. "is Null" will be returned as "IS NULL". To get the real text from the underlying SQL, use getText(). For all tokens where isReservedWord() == false getText and getContents() will return exactly the same. A string representing the text of the token
See Also:   SQLToken.getText()



getDescription
public String getDescription()(Code)
A description of this token. The description should be appropriate for syntax highlighting. For example "comment" is returned for a comment. a description of this token.



getID
public int getID()(Code)
get the ID number of this token the id number of the token



getLineNumber
public int getLineNumber()(Code)
get the line number of the input on which this token started the line number of the input on which this token started



getState
public int getState()(Code)
Get an integer representing the state the tokenizer is in after returning this token. Those who are interested in incremental tokenizing for performance reasons will want to use this method to figure out where the tokenizer may be restarted. The tokenizer starts in Token.INITIAL_STATE, so any time that it reports that it has returned to this state, the tokenizer may be restarted from there.



getText
public String getText()(Code)
Returned an uparsed version of the contents of this token. To get a



isComment
public boolean isComment()(Code)
Checks this token to see if it is a comment. true if this token is a comment, false otherwise



isError
public boolean isError()(Code)
Checks this token to see if it is an Error. Unfinished comments, numbers that are too big, unclosed strings, etc. true if this token is an Error, false otherwise



isIdentifier
public boolean isIdentifier()(Code)
Checks this token to see if it is an identifier. true if this token is an identifier, false otherwise



isIntegerLiteral
public boolean isIntegerLiteral()(Code)



isLiteral
public boolean isLiteral()(Code)
Checks this token to see if it is a literal. true if this token is a literal, false otherwise



isNumberLiteral
public boolean isNumberLiteral()(Code)



isOperator
public boolean isOperator()(Code)
Checks this token to see if it is a Operator. true if this token is a Operator, false otherwise



isReservedWord
public boolean isReservedWord()(Code)
Checks this token to see if it is a reserved word. true if this token is a reserved word, false otherwise



isSeparator
public boolean isSeparator()(Code)
Checks this token to see if it is a Separator. true if this token is a Separator, false otherwise



isWhiteSpace
public boolean isWhiteSpace()(Code)
Checks this token to see if it is White Space. Usually tabs, line breaks, form feed, spaces, etc. true if this token is White Space, false otherwise



toString
public String toString()(Code)
get a representation of this token as a human readable string. The format of this string is subject to change and should only be used for debugging purposes. a string representation of this token



Fields inherited from workbench.sql.formatter.Token
final public static int INITIAL_STATE(Code)(Java Doc)
final public static int UNDEFINED_STATE(Code)(Java Doc)

Methods inherited from workbench.sql.formatter.Token
abstract public String errorString()(Code)(Java Doc)
abstract public int getCharBegin()(Code)(Java Doc)
abstract public int getCharEnd()(Code)(Java Doc)
abstract public String getContents()(Code)(Java Doc)
abstract public String getDescription()(Code)(Java Doc)
abstract public int getID()(Code)(Java Doc)
abstract public int getLineNumber()(Code)(Java Doc)
abstract public int getState()(Code)(Java Doc)
abstract public boolean isComment()(Code)(Java Doc)
abstract public boolean isError()(Code)(Java Doc)
abstract public boolean isWhiteSpace()(Code)(Java Doc)

Methods inherited from java.lang.Object
native protected Object clone() throws CloneNotSupportedException(Code)(Java Doc)
public boolean equals(Object obj)(Code)(Java Doc)
protected void finalize() throws Throwable(Code)(Java Doc)
final native public Class getClass()(Code)(Java Doc)
native public int hashCode()(Code)(Java Doc)
final native public void notify()(Code)(Java Doc)
final native public void notifyAll()(Code)(Java Doc)
public String toString()(Code)(Java Doc)
final native public void wait(long timeout) throws InterruptedException(Code)(Java Doc)
final public void wait(long timeout, int nanos) throws InterruptedException(Code)(Java Doc)
final public void wait() throws InterruptedException(Code)(Java Doc)

www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.