Java Doc for TokenizerProperty.java in  » Parser » JTopas » de » susebox » jtopas » 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 » Parser » JTopas » de.susebox.jtopas 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


java.lang.Object
   de.susebox.jtopas.TokenizerProperty

TokenizerProperty
public class TokenizerProperty (Code)

This class is mainly used by TokenizerProperties implementations to return java.util.Iterator objects of their various properties (keywords, special sequences etc.). Moreover, it can be used whereever information about a lexical element description is needed, for instance when firing a TokenizerPropertyEvent .

This class replaces the older de.susebox.java.util.TokenizerProperty class which is deprecated.


See Also:   TokenizerProperties
author:
   Heiko Blau


Field Summary
final public static  bytePARSE_FLAG_MASK
     The property describes a parse flag mask.
protected  Object_companion
    
protected  int_flagMask
    
protected  int_flags
    
protected  String[]_images
    
protected  int_type
    

Constructor Summary
public  TokenizerProperty()
     Default constructor.
public  TokenizerProperty(int type)
     Constructs a TokenizerProperty where only the type is known so far.
public  TokenizerProperty(int type, String[] images)
     Constructs a TokenizerProperty with type and image(s).
public  TokenizerProperty(int type, String[] images, Object companion)
     Constructs a TokenProperty object with a set of type, image(s) and companion.
public  TokenizerProperty(int type, String[] images, Object companion, int flags)
     Constructs a TokenProperty object with a set of type, image(s), companion object and flags.
public  TokenizerProperty(int type, String[] images, Object companion, int flags, int flagMask)
     Constructs a TokenProperty object with a set of type, image(s), companion object and flags with an associated flag mask (
See Also:    #setFlags(int, int) for details).

Method Summary
public  booleancontainsFlag(int flag)
     Checks wether a given flag is in the current flag mask.
public  booleanequals(Object that)
     Redefinition of the well-known java.lang.Object.equals method.
public  ObjectgetCompanion()
     Obtaining the associated information of the token.
public  intgetFlagMask()
     Retrieving the current flag mask containing the bits that are valid in the return value of TokenizerProperty.getFlags .
public  intgetFlags()
     Retrieving the flags of this property.
public  String[]getImages()
     Retrieving the one or more images a lexical element description has.
public  intgetType()
     Retrieving the type of this property.
public  booleanisFlagSet(int flag, boolean defVal)
     Checks wether a given flag is set or cleared for this property.
public  voidsetCompanion(Object companion)
     Some token may have associated informations for the user of the Token.
public  voidsetFlags(int flags)
     Setting flags.
public  voidsetFlags(int flags, int flagMask)
     Setting the values for the flags contained in the flag mask.
public  voidsetImages(String[] images)
     Images of lexical elements are quite different.
public  voidsetType(int type)
     Setting the type of the TokenizerProperty.
public  StringtoString()
     Redefinition of the well-known java.lang.Object.toString method.

Field Detail
PARSE_FLAG_MASK
final public static byte PARSE_FLAG_MASK(Code)
The property describes a parse flag mask. This type is nessecary for the "parse flag changed" event fired by TokenizerProperties implementations.



_companion
protected Object _companion(Code)



_flagMask
protected int _flagMask(Code)



_flags
protected int _flags(Code)



_images
protected String[] _images(Code)



_type
protected int _type(Code)




Constructor Detail
TokenizerProperty
public TokenizerProperty()(Code)
Default constructor. Initializes a property with type Token.UNKNOWN and no images or flags.



TokenizerProperty
public TokenizerProperty(int type)(Code)
Constructs a TokenizerProperty where only the type is known so far. For the type, one of the constants defined in Token must be used.
Parameters:
  type - the property type



TokenizerProperty
public TokenizerProperty(int type, String[] images)(Code)
Constructs a TokenizerProperty with type and image(s). For the type, one of the constants defined in Token must be used.
Parameters:
  type - the property type
Parameters:
  images - the characterising images of a lexical element



TokenizerProperty
public TokenizerProperty(int type, String[] images, Object companion)(Code)
Constructs a TokenProperty object with a set of type, image(s) and companion.
Parameters:
  type - the property type
Parameters:
  images - the characterising images of a lexical element
Parameters:
  companion - the associated information for the lexical element



TokenizerProperty
public TokenizerProperty(int type, String[] images, Object companion, int flags)(Code)
Constructs a TokenProperty object with a set of type, image(s), companion object and flags.
Parameters:
  type - the property type
Parameters:
  images - the characterising images of a lexical element
Parameters:
  companion - the associated information for the lexical element
Parameters:
  flags - the specific parse flags for this lexical element



TokenizerProperty
public TokenizerProperty(int type, String[] images, Object companion, int flags, int flagMask)(Code)
Constructs a TokenProperty object with a set of type, image(s), companion object and flags with an associated flag mask (
See Also:    #setFlags(int, int) for details).
Parameters:
  type - the property type
Parameters:
  images - the characterising images of a lexical element
Parameters:
  companion - the associated information for the lexical element
Parameters:
  flags - the specific parse flags for this lexical element
Parameters:
  flagMask - which bits of the parse flags are actually valid




Method Detail
containsFlag
public boolean containsFlag(int flag)(Code)
Checks wether a given flag is in the current flag mask. That means that the property contains its own explicit value for the flag.
The method can be used in combination with TokenizerProperty.isFlagSet to determine wether the return value of isFlagSet is actually the default value given to that method, or the flag value of the property itself.
The method returns true only if the all bits in the given flag are in the current flag mask.
Parameters:
  flag - the flag to check
Parameters:
  defVal - the default value if the flag is not contained in the current flag mask true if the given flag is explicitely set or the defaultvalue is true, false if the given flag isexplicitely cleared or the default value is false.



equals
public boolean equals(Object that)(Code)
Redefinition of the well-known java.lang.Object.equals method.
Parameters:
  that - compare this instance with that object true if the two object describe the same property,false otherwise



getCompanion
public Object getCompanion()(Code)
Obtaining the associated information of the token. Can be null. See TokenizerProperty.setCompanion for details. the associated information of this token



getFlagMask
public int getFlagMask()(Code)
Retrieving the current flag mask containing the bits that are valid in the return value of TokenizerProperty.getFlags . The return value -1 means that all bits in getFlags are explicitely set for this property. a bitmask containing the flags that are explicitely set for this property
See Also:   TokenizerProperty.getFlags()
See Also:   TokenizerProperty.setFlags(int,int)



getFlags
public int getFlags()(Code)
Retrieving the flags of this property. flags of the property
See Also:   TokenizerProperty.setFlags
See Also:   TokenizerProperty.getFlags(int)



getImages
public String[] getImages()(Code)
Retrieving the one or more images a lexical element description has. the array with images like string start and end sequences etc.
See Also:   TokenizerProperty.setImages



getType
public int getType()(Code)
Retrieving the type of this property. Usually, one of the constants defined in Token is returned, for instance Token.NORMAL , Token.KEYWORD or Token.WHITESPACE . However, implementations and subclasses of the interfaces and classes in the package de.susebox.jtopas may define, set and return their own type constants. type of the property
See Also:   TokenizerProperty.setType



isFlagSet
public boolean isFlagSet(int flag, boolean defVal)(Code)
Checks wether a given flag is set or cleared for this property. The default value is returned if the current flag mask (see TokenizerProperty.getFlagMask ) does not contain the given flag. This is the case if TokenizerProperty.containsFlag would return false for the given flag.
If containsFlag returns true for the given flag, isFlagSet returns true only if the all bits in the given flag are in the current flags.
Parameters:
  flag - the flag to check
Parameters:
  defVal - the default value if the flag is not contained in the current flag mask true if the given flag is explicitely set or the defaultvalue is true, false if the given flag isexplicitely cleared or the default value is false.



setCompanion
public void setCompanion(Object companion)(Code)
Some token may have associated informations for the user of the Token. A popular thing would be the association of an integer constant to a special sequence or keyword to be used in fast switch statetents.
Parameters:
  companion - the associated information for the lexical element



setFlags
public void setFlags(int flags)(Code)
Setting flags. These flags are not specified here. Usually, a combination of TokenizerProperties F_... constants is used here.
The method is equivalent to TokenizerProperty.setFlags(int,int) (flags, flags).
Parameters:
  flags - a bitmask
See Also:   TokenizerProperty.getFlags



setFlags
public void setFlags(int flags, int flagMask)(Code)
Setting the values for the flags contained in the flag mask. The flags are not specified here. Usually, a combination of TokenizerProperties F_... constants is used here.
The flag mask contains the set flags that are valid for this TokenizerProperty. Flags that are not contained in the flag mask, have an "unknown" value in this instance.
A flag mask value of -1 means that all flags should are valid. flag = 0 and flagMask = TokenizerProperties.F_CASE means that the property is case-insensitive, but there are no other characteristics explicitely set for this property.

Parameters:
  flags - a bitmask of flags to be set or clear
Parameters:
  flagMask - a bitmask containing the flags that are valid in flags
See Also:   TokenizerProperty.getFlags



setImages
public void setImages(String[] images) throws IllegalArgumentException(Code)
Images of lexical elements are quite different. Starting sequences of line comments, keywords and special sequences are strings representing only themselfes. Whitespaces and separators are represented as string consisting of the single whitespace and separator characters and / or character ranges.
A block comment is represented an array of two strings. The first is the starting sequence, the second the finishing sequence. The same is true for string elements. However, string elements usually have an escape sequence.
Parameters:
  images - the characterising images of a lexical element



setType
public void setType(int type)(Code)
Setting the type of the TokenizerProperty. Usually, one of the constants defined in Token is passed to this method, for instance Token.NORMAL , Token.KEYWORD or Token.WHITESPACE .
However, implementations and subclasses of the interfaces and classes in the package de.susebox.jtopas may define, set and return their own type constants.
Parameters:
  type - type of the tokenizer property (one of the Token constants)
See Also:   Token
See Also:   TokenizerProperty.getType



toString
public String toString()(Code)
Redefinition of the well-known java.lang.Object.toString method. a string representation of this TokenizerProperty



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.