Java Doc for AbstractTokenizerProperties.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.AbstractTokenizerProperties

All known Subclasses:   de.susebox.jtopas.StandardTokenizerProperties,
AbstractTokenizerProperties
abstract public class AbstractTokenizerProperties implements TokenizerProperties(Code)

The class AbstractTokenizerProperties provides the skeleton for implementations of the TokenizerProperties interface. It leaves only the more general methods to these implementations. For instance, the simple method AbstractTokenizerProperties.addKeyword(String) can and should call the more complex method AbstractTokenizerProperties.addKeyword(String,String) with the second parameter null. That method in turn should call AbstractTokenizerProperties.addKeyword(String,String,int) etc.


See Also:   TokenizerProperties
See Also:   Tokenizer
author:
   Heiko Blau


Field Summary
protected  int_flags
     overall tokenizer flags.


Method Summary
public  voidaddBlockComment(String start, String end)
     Registering a block comment.
public  voidaddBlockComment(String start, String end, Object companion)
     Registering a block comment.
public  voidaddBlockComment(String start, String end, Object companion, int flags)
     Registering a block comment.
public  voidaddBlockComment(String start, String end, Object companion, int flags, int flagMask)
     Registering a block comment with a set of flags and an associated flag mask.
public  voidaddKeyword(String keyword)
     Registering a keyword.
public  voidaddKeyword(String keyword, Object companion)
     Registering a keyword.
public  voidaddKeyword(String keyword, Object companion, int flags)
     Registering a keyword.
public  voidaddKeyword(String keyword, Object companion, int flags, int flagMask)
     Registering a keyword with a set of flags and an associated flag mask..
public  voidaddLineComment(String lineComment)
     Registering a the starting sequence of a line comment.
public  voidaddLineComment(String lineComment, Object companion)
     Registering a the starting sequence of a line comment.
public  voidaddLineComment(String lineComment, Object companion, int flags)
     Registering a the starting sequence of a line comment.
public  voidaddLineComment(String lineComment, Object companion, int flags, int flagMask)
     Registering a line comment with a set of flags and an associated flag mask.
public  voidaddPattern(String pattern)
     Registering a pattern.
public  voidaddPattern(String pattern, Object companion)
     Registering a pattern with an associated object.
public  voidaddPattern(String pattern, Object companion, int flags)
     Registering a pattern with an associated object.
public  voidaddPattern(String pattern, Object companion, int flags, int flagMask)
     Registering a pattern with an associated object and explicitely given flags.
public  voidaddProperty(TokenizerProperty property)
     Registering a TokenizerProperty .
public  voidaddSeparators(String separators)
     Adding new separators to the existing set.
Parameters:
  separators - additional separators for the separator set
throws:
  IllegalArgumentException - when null is passed or incompleteranges are specified (e.g.
public  voidaddSpecialSequence(String specSeq)
     Registering a special sequence of characters.
public  voidaddSpecialSequence(String specSeq, Object companion)
     Registering a special sequence of characters.
public  voidaddSpecialSequence(String specSeq, Object companion, int flags)
     Registering a special sequence of characters.
public  voidaddSpecialSequence(String specSeq, Object companion, int flags, int flagMask)
     Registering a special sequence with a set of flags and an associated flag mask.
public  voidaddString(String start, String end, String escape)
     Registering a string description.
public  voidaddString(String start, String end, String escape, Object companion)
     Registering a the sequences that are used for string-like text parts.
public  voidaddString(String start, String end, String escape, Object companion, int flags)
     Registering a the sequences that are used for string-like text parts.
public  voidaddString(String start, String end, String escape, Object companion, int flags, int flagMask)
     Registering a string with a set of flags and an associated flag mask.
public  voidaddTokenizerPropertyListener(TokenizerPropertyListener listener)
     Registering a new TokenizerPropertyListener .
public  voidaddWhitespaces(String whitespaces)
     Adding new whitespaces to the existing set.
Parameters:
  additional - whitespaces for the whitespace set
throws:
  IllegalArgumentException - when null is passed or incompleteranges are specified (e.g.
public  booleanblockCommentExists(String start)
     Checks if the given block comment is known.
protected  voidcheckArgument(String arg, String name)
     Checking a string parameter on null or emptiness.
protected  voidcheckPropertyArgument(TokenizerProperty property)
     Checking a TokenizerProperty parameter on null or missing nessecary values.
abstract protected  TokenizerPropertydoAddProperty(TokenizerProperty property)
     This method must be implemented by derived classes to register a TokenizerProperty .
abstract protected  TokenizerPropertydoGetProperty(int type, String startImage)
     This method must be implemented by derived classes to retrieve the TokenizerProperty for the given image.
abstract protected  TokenizerPropertydoRemoveProperty(TokenizerProperty property)
     This method must be implemented by derived classes to deregister a TokenizerProperty .
abstract protected  StringdoSetSeparators(String separators)
     This method must be implemented by derived classes to set the given simple separators.
abstract protected  StringdoSetWhitespaces(String whitespaces)
     This method must be implemented by derived classes to register the given simple whitespaces.
public  TokenizerPropertygetBlockComment(String start)
     Get the full description of a block comment property.
public  ObjectgetBlockCommentCompanion(String start)
     Retrieving a certain block comment.
public  TokenizerPropertygetKeyword(String keyword)
     Get the full description of a keyword property.
public  ObjectgetKeywordCompanion(String keyword)
     Retrieving the companion of the given keyword.
public  TokenizerPropertygetLineComment(String lineComment)
     Get the full description of a line comment property.
public  ObjectgetLineCommentCompanion(String lineComment)
     Retrieving the associated object of a certain line comment.
public  intgetParseFlags()
     See the method description in TokenizerProperties .
public  TokenizerPropertygetPattern(String pattern)
     Get the full description of a string property starting with the given prefix.
public  ObjectgetPatternCompanion(String pattern)
     Retrieving the information associated with a given pattern.
public  TokenizerPropertygetSpecialSequence(String specSeq)
     Get the full description of a special sequence property.
public  ObjectgetSpecialSequenceCompanion(String specSeq)
     Retrieving the companion of the given special sequence.
public  TokenizerPropertygetString(String start)
     Get the full description of a string property.
public  ObjectgetStringCompanion(String start)
     Retrieving the information associated with a certain string.
protected  voidhandleEvent(int type, String newValue, String oldValue)
     The method fires the nessecary events when whitespace or separator sets change.
public  booleanisFlagSet(int flag)
     Returns true if a given flag is set in the current parse flags.
public  booleanisFlagSet(TokenizerProperty prop, int flag)
     Checks if a given flag (see the constants in Flags ) is set for the given TokenizerProperty in the context of this TokenizerProperties instance.
public  booleankeywordExists(String keyword)
     Checks if the given keyword is known to the Tokenizer.
public  booleanlineCommentExists(String lineComment)
     Checks if the give line comment is known.
protected  voidnotifyListeners(TokenizerPropertyEvent event)
     Notifying the registered listeners about a change in the properties.
public  booleanpatternExists(String pattern)
     Checks if the given pattern is known to the parser.
public  booleanpropertyExists(TokenizerProperty property)
     Checks if the given TokenizerProperty is known.
public  voidremoveBlockComment(String start)
     Removing a certain block comment.
public  voidremoveKeyword(String keyword)
     Deregistering a keyword.
public  voidremoveLineComment(String lineComment)
     Removing a certain line comment.
public  voidremovePattern(String pattern)
     Removing a pattern.
public  voidremoveProperty(TokenizerProperty property)
     Deregistering a TokenizerProperty from the store.
public  voidremoveSeparators(String separators)
     Removing separators from the existing set.
Parameters:
  separators - separating characters to remove from the separator set
throws:
  IllegalArgumentException - when null is passed or incompleteranges are specified (e.g.
public  voidremoveSpecialSequence(String specSeq)
     Deregistering a special sequence from the parser.
public  voidremoveString(String start)
     Removing a string description.
public  voidremoveTokenizerPropertyListener(TokenizerPropertyListener listener)
     Removing a listener from the list of registered TokenizerPropertyListener instances.
public  voidremoveWhitespaces(String whitespaces)
     Removing whitespaces from the existing set.
Parameters:
  whitespaces - whitespaces to remove from the whitespace set
throws:
  IllegalArgumentException - when null is passed or incompleteranges are specified (e.g.
public  voidsetParseFlags(int flags)
     See the method description in TokenizerProperties .
public  voidsetSeparators(String separators)
     Setting the separator character set of the tokenizer.
public  voidsetWhitespaces(String whitespaces)
     Setting the whitespace character set of the tokenizer.
public  booleanspecialSequenceExists(String specSeq)
     Checks if the given special sequence is known to the Tokenizer.
public  booleanstringExists(String start)
     Checks if the given starting sequence of the string is known to the parser.

Field Detail
_flags
protected int _flags(Code)
overall tokenizer flags.





Method Detail
addBlockComment
public void addBlockComment(String start, String end) throws IllegalArgumentException(Code)
Registering a block comment. See the method description in TokenizerProperties .
Parameters:
  start - the starting sequence of the block comment
Parameters:
  end - the finishing sequence of the block comment
throws:
  IllegalArgumentException - when null or an empty string is passed for start / end sequence of the block comment



addBlockComment
public void addBlockComment(String start, String end, Object companion) throws IllegalArgumentException(Code)
Registering a block comment. See the method description in TokenizerProperties .
Parameters:
  start - the starting sequence of the block comment
Parameters:
  end - the finishing sequence of the block comment
Parameters:
  companion - information object associated with this block comment
throws:
  IllegalArgumentException - when null or an empty string is passed for start / end sequence of the block comment



addBlockComment
public void addBlockComment(String start, String end, Object companion, int flags) throws IllegalArgumentException(Code)
Registering a block comment. See the method description in TokenizerProperties .
Parameters:
  start - the starting sequence of the block comment
Parameters:
  end - the finishing sequence of the block comment
Parameters:
  companion - information object associated with this block comment
Parameters:
  flags - modification flags
throws:
  IllegalArgumentException - when null or an empty string is passed for start / end sequence of the block comment



addBlockComment
public void addBlockComment(String start, String end, Object companion, int flags, int flagMask) throws IllegalArgumentException(Code)
Registering a block comment with a set of flags and an associated flag mask.
Parameters:
  start - the starting sequence of the block comment
Parameters:
  end - the finishing sequence of the block comment
Parameters:
  companion - information object associated with this block comment
Parameters:
  flags - modification flags
Parameters:
  flagMask - flags that have valid values in the parameter flags
throws:
  IllegalArgumentException - when null or an empty stringis passed for keyword



addKeyword
public void addKeyword(String keyword) throws IllegalArgumentException(Code)
Registering a keyword. See the method description in TokenizerProperties .
Parameters:
  keyword - keyword to register
throws:
  IllegalArgumentException - if the given keyword is empty or null



addKeyword
public void addKeyword(String keyword, Object companion) throws IllegalArgumentException(Code)
Registering a keyword. See the method description in TokenizerProperties .
Parameters:
  keyword - keyword to register
Parameters:
  companion - information object associated with this keyword
throws:
  IllegalArgumentException - if the given keyword is empty or null



addKeyword
public void addKeyword(String keyword, Object companion, int flags) throws IllegalArgumentException(Code)
Registering a keyword. See the method description in TokenizerProperties .
Parameters:
  keyword - keyword to register
Parameters:
  companion - information object associated with this keyword
throws:
  IllegalArgumentException - if the given keyword is empty or null



addKeyword
public void addKeyword(String keyword, Object companion, int flags, int flagMask) throws IllegalArgumentException(Code)
Registering a keyword with a set of flags and an associated flag mask..
Parameters:
  keyword - keyword to register
Parameters:
  companion - information object associated with this keyword
Parameters:
  flags - modification flags
Parameters:
  flagMask - flags that have valid values in the parameter flags
throws:
  IllegalArgumentException - when null or an empty stringis passed for keyword



addLineComment
public void addLineComment(String lineComment) throws IllegalArgumentException(Code)
Registering a the starting sequence of a line comment. See the method description in TokenizerProperties .
Parameters:
  lineComment - the starting sequence of the line comment
throws:
  IllegalArgumentException - when null or an empty string is passed for start sequence of the line comment



addLineComment
public void addLineComment(String lineComment, Object companion) throws IllegalArgumentException(Code)
Registering a the starting sequence of a line comment. See the method description in TokenizerProperties .
Parameters:
  lineComment - the starting sequence of a line comment
Parameters:
  companion - the associated information
throws:
  IllegalArgumentException - when null or an empty string is passed for start sequence of the line comment



addLineComment
public void addLineComment(String lineComment, Object companion, int flags) throws IllegalArgumentException(Code)
Registering a the starting sequence of a line comment. See the method description in TokenizerProperties .
Parameters:
  lineComment - the starting sequence of a line comment
Parameters:
  companion - the associated information
Parameters:
  flags - modification flags
throws:
  IllegalArgumentException - when null or an empty string is passed for start sequence of the line comment



addLineComment
public void addLineComment(String lineComment, Object companion, int flags, int flagMask) throws IllegalArgumentException(Code)
Registering a line comment with a set of flags and an associated flag mask.
Parameters:
  lineComment - the starting sequence of a line comment
Parameters:
  companion - the associated information
Parameters:
  flags - modification flags
Parameters:
  flagMask - flags that have valid values in the parameter flags
throws:
  IllegalArgumentException - when null or an empty stringis passed for keyword



addPattern
public void addPattern(String pattern) throws IllegalArgumentException(Code)
Registering a pattern. See the method description in TokenizerProperties .
Parameters:
  pattern - the regular expression to be added
throws:
  IllegalArgumentException - when null or an empty patternis passed
See Also:   AbstractTokenizerProperties.removePattern
See Also:   AbstractTokenizerProperties.addPattern(String,Object)
See Also:   AbstractTokenizerProperties.addPattern(String,Object,int)



addPattern
public void addPattern(String pattern, Object companion) throws IllegalArgumentException(Code)
Registering a pattern with an associated object. See the method description in TokenizerProperties .
Parameters:
  pattern - the regular expression to be added
Parameters:
  companion - information object associated with this pattern
throws:
  IllegalArgumentException - when null or an empty patternis passed
See Also:   AbstractTokenizerProperties.removePattern
See Also:   AbstractTokenizerProperties.addPattern(String)
See Also:   AbstractTokenizerProperties.addPattern(String,Object,int)



addPattern
public void addPattern(String pattern, Object companion, int flags) throws IllegalArgumentException(Code)
Registering a pattern with an associated object. See the method description in TokenizerProperties .
Parameters:
  pattern - the regular expression to be added
Parameters:
  companion - information object associated with this keyword
Parameters:
  flags - modification flags
throws:
  IllegalArgumentException - when null or an empty patternis passed
See Also:   AbstractTokenizerProperties.removePattern
See Also:   AbstractTokenizerProperties.addPattern(String)
See Also:   AbstractTokenizerProperties.addPattern(String,Object)



addPattern
public void addPattern(String pattern, Object companion, int flags, int flagMask) throws IllegalArgumentException(Code)
Registering a pattern with an associated object and explicitely given flags. See the description of the AbstractTokenizerProperties.addPattern(String) for details on pattern.
Parameters:
  pattern - the regular expression to be added
Parameters:
  companion - information object associated with this keyword
Parameters:
  flags - values for modification flags
Parameters:
  flagMask - flags that have valid values in the parameter flags
throws:
  IllegalArgumentException - when null or an empty patternis passed



addProperty
public void addProperty(TokenizerProperty property) throws IllegalArgumentException(Code)
Registering a TokenizerProperty . See the method description in TokenizerProperties .
Parameters:
  property - property to register
throws:
  IllegalArgumentException - when null, an incomplete or otherwise unusable property is passed



addSeparators
public void addSeparators(String separators) throws IllegalArgumentException(Code)
Adding new separators to the existing set.
Parameters:
  separators - additional separators for the separator set
throws:
  IllegalArgumentException - when null is passed or incompleteranges are specified (e.g. "a-")



addSpecialSequence
public void addSpecialSequence(String specSeq) throws IllegalArgumentException(Code)
Registering a special sequence of characters. See the method description in TokenizerProperties .
Parameters:
  specSeq - special sequence to register
throws:
  IllegalArgumentException - if the given sequence is empty or null
See Also:   AbstractTokenizerProperties.addKeyword
See Also:   AbstractTokenizerProperties.setSeparators



addSpecialSequence
public void addSpecialSequence(String specSeq, Object companion) throws IllegalArgumentException(Code)
Registering a special sequence of characters. See the method description in TokenizerProperties .
Parameters:
  specSeq - special sequence to register
Parameters:
  companion - information object associated with this special sequence
throws:
  IllegalArgumentException - if the given sequence is empty or null
See Also:   AbstractTokenizerProperties.addKeyword
See Also:   AbstractTokenizerProperties.setSeparators



addSpecialSequence
public void addSpecialSequence(String specSeq, Object companion, int flags) throws IllegalArgumentException(Code)
Registering a special sequence of characters. See the method description in TokenizerProperties .
Parameters:
  specSeq - special sequence to register
Parameters:
  companion - information object associated with this special sequence
Parameters:
  flags - modification flags
throws:
  IllegalArgumentException - if the given sequence is empty or null
See Also:   AbstractTokenizerProperties.addKeyword
See Also:   AbstractTokenizerProperties.setSeparators



addSpecialSequence
public void addSpecialSequence(String specSeq, Object companion, int flags, int flagMask) throws IllegalArgumentException(Code)
Registering a special sequence with a set of flags and an associated flag mask.
Parameters:
  specSeq - special sequence to register
Parameters:
  companion - information object associated with this special sequence
Parameters:
  flags - modification flags
Parameters:
  flagMask - flags that have valid values in the parameter flags
throws:
  IllegalArgumentException - when null or an empty stringis passed for keyword



addString
public void addString(String start, String end, String escape) throws IllegalArgumentException(Code)
Registering a string description. See the method description in the interface TokenizerProperties .
Parameters:
  start - the starting sequence of a string
Parameters:
  end - the finishing sequence of a string
Parameters:
  escape - the escape sequence inside the string
throws:
  IllegalArgumentException - when null or an empty string is passed for start or end
See Also:   AbstractTokenizerProperties.removeString
See Also:   AbstractTokenizerProperties.addString(String,String,String,Object)



addString
public void addString(String start, String end, String escape, Object companion) throws IllegalArgumentException(Code)
Registering a the sequences that are used for string-like text parts. See the method description in TokenizerProperties .
Parameters:
  start - the starting sequence of a string
Parameters:
  end - the finishing sequence of a string
Parameters:
  escape - the escape sequence inside the string
Parameters:
  companion - the associated information
throws:
  IllegalArgumentException - when null or an empty string is passed for start or end



addString
public void addString(String start, String end, String escape, Object companion, int flags) throws IllegalArgumentException(Code)
Registering a the sequences that are used for string-like text parts. See the method description in TokenizerProperties .
Parameters:
  start - the starting sequence of a string
Parameters:
  end - the finishing sequence of a string
Parameters:
  escape - the escape sequence inside the string
Parameters:
  companion - the associated information
Parameters:
  flags - modification flags
throws:
  IllegalArgumentException - when null or an empty string is passed for start or end



addString
public void addString(String start, String end, String escape, Object companion, int flags, int flagMask) throws IllegalArgumentException(Code)
Registering a string with a set of flags and an associated flag mask.
Parameters:
  start - the starting sequence of a string
Parameters:
  end - the finishing sequence of a string
Parameters:
  escape - the escape sequence inside the string
Parameters:
  companion - the associated information
Parameters:
  flags - modification flags
Parameters:
  flagMask - flags that have valid values in the parameter flags
throws:
  IllegalArgumentException - when null or an empty stringis passed for keyword



addTokenizerPropertyListener
public void addTokenizerPropertyListener(TokenizerPropertyListener listener)(Code)
Registering a new TokenizerPropertyListener . See the method description in TokenizerProperties .
Parameters:
  listener - the new TokenizerPropertyListener
See Also:   AbstractTokenizerProperties.removeTokenizerPropertyListener



addWhitespaces
public void addWhitespaces(String whitespaces) throws IllegalArgumentException(Code)
Adding new whitespaces to the existing set.
Parameters:
  additional - whitespaces for the whitespace set
throws:
  IllegalArgumentException - when null is passed or incompleteranges are specified (e.g. "a-")



blockCommentExists
public boolean blockCommentExists(String start)(Code)
Checks if the given block comment is known. See the method description in TokenizerProperties .
Parameters:
  start - the starting sequence of the block comment true if the block comment is known, false otherwise



checkArgument
protected void checkArgument(String arg, String name) throws IllegalArgumentException(Code)
Checking a string parameter on null or emptiness. The method encapsulates commonly used code (see AbstractTokenizerProperties.addKeyword or AbstractTokenizerProperties.addSpecialSequence for example).
Parameters:
  arg - the parameter to check
Parameters:
  name - a name for the arg parameter
throws:
  IllegalArgumentException - if the given arg is null or empty



checkPropertyArgument
protected void checkPropertyArgument(TokenizerProperty property) throws IllegalArgumentException(Code)
Checking a TokenizerProperty parameter on null or missing nessecary values. The method encapsulates commonly used code (see AbstractTokenizerProperties.addProperty and AbstractTokenizerProperties.removeProperty ).
Parameters:
  property - the parameter to check
throws:
  IllegalArgumentException - if the given arg is null or empty



doAddProperty
abstract protected TokenizerProperty doAddProperty(TokenizerProperty property)(Code)
This method must be implemented by derived classes to register a TokenizerProperty . When called, the given property has already been checked for not being null or incomplete (no leading image).
If the property to register is already known, perhaps with a different type, different flags or a different companion, it is replaced and returned.
The notification of the registered TokenizerPropertyListener is done by this abstract class, the implementations must not do it themselves.
The method is called in a thread-safe way. That means only one thread can enter the method at a given time.
Parameters:
  property - a non-null, complete token description the old, replaced property or null



doGetProperty
abstract protected TokenizerProperty doGetProperty(int type, String startImage)(Code)
This method must be implemented by derived classes to retrieve the TokenizerProperty for the given image. When called, the given image has already been checked for not being null.
According to the TokenizerProperties interface specification of the various get methods, this method must return null if there is no property that matches the given image.
The method is called in a thread-safe way. That means only one thread can enter the method at a given time.
Parameters:
  type - the type the returned property should have
Parameters:
  startImage - the (starting) image the token description for the image or null



doRemoveProperty
abstract protected TokenizerProperty doRemoveProperty(TokenizerProperty property)(Code)
This method must be implemented by derived classes to deregister a TokenizerProperty . When called, the given property has already been checked for not being null or incomplete (no leading image).
According to the TokenizerProperties interface specification of the TokenizerProperties.removeProperty method, this method does nothing if the given property is unknown. In this case null is returned.
Otherwise the removed property is returned.
The notification of the registered TokenizerPropertyListener is done by this abstract class, the implementations must not do it themselves.
The method is called in a thread-safe way. That means only one thread can enter the method at a given time.
Parameters:
  property - a non-null, complete token description the removed property or null



doSetSeparators
abstract protected String doSetSeparators(String separators)(Code)
This method must be implemented by derived classes to set the given simple separators. When called, the calling method AbstractTokenizerProperties.setSeparators has already ensured that the parameter is not null (but empty) and uppercase if the Flags.F_NO_CASE flag is set.
The method should return the old separator set. When first called, this is the default separator set. It is ok to return null if the old set is empty.
The notification of the registered TokenizerPropertyListener is done by this abstract class, the implementations must not do it themselves.
The method is called in a thread-safe way. That means only one thread can enter the method at a given time.
Parameters:
  separators - the new separator set the old separator set



doSetWhitespaces
abstract protected String doSetWhitespaces(String whitespaces)(Code)
This method must be implemented by derived classes to register the given simple whitespaces. When called, the calling method has already ensured that the parameter is not null (but could be empty) and uppercase if the Flags.F_NO_CASE flag is set.
The method should return the old whitespace set. When first called, this is the default whitespace set. It is ok to return null if the old set is empty.
The notification of the registered TokenizerPropertyListener is done by this abstract class, the implementations must not do it themselves.
The method is called in a thread-safe way. That means only one thread can enter the method at a given time.
Parameters:
  whitespaces - the new whitespace set the old whitespace set



getBlockComment
public TokenizerProperty getBlockComment(String start) throws IllegalArgumentException(Code)
Get the full description of a block comment property. See the method description in TokenizerProperties .
Parameters:
  start - the starting sequence of the block comment the full block comment description or null
throws:
  IllegalArgumentException - if the given image is empty or null



getBlockCommentCompanion
public Object getBlockCommentCompanion(String start) throws IllegalArgumentException(Code)
Retrieving a certain block comment. See the method description in TokenizerProperties .
Parameters:
  start - the starting sequence of the block comment the associated object of the block comment
throws:
  IllegalArgumentException - when null or an empty string is passed for start sequence of the block comment



getKeyword
public TokenizerProperty getKeyword(String keyword) throws IllegalArgumentException(Code)
Get the full description of a keyword property. See the method description in TokenizerProperties .
Parameters:
  keyword - keyword to search the full keyword description or null
throws:
  IllegalArgumentException - if the given keyword is empty or null



getKeywordCompanion
public Object getKeywordCompanion(String keyword) throws IllegalArgumentException(Code)
Retrieving the companion of the given keyword. See the method description in TokenizerProperties .
Parameters:
  keyword - keyword thats companion is sought the object associated with the keyword
throws:
  IllegalArgumentException - if the given keyword is empty or null



getLineComment
public TokenizerProperty getLineComment(String lineComment) throws IllegalArgumentException(Code)
Get the full description of a line comment property. See the method description in TokenizerProperties .
Parameters:
  lineComment - the starting sequence of the line comment the full line comment description or null
throws:
  IllegalArgumentException - if the given image is empty or null



getLineCommentCompanion
public Object getLineCommentCompanion(String lineComment) throws IllegalArgumentException(Code)
Retrieving the associated object of a certain line comment. See the method description in TokenizerProperties .
Parameters:
  lineComment - the starting sequence of the line comment the object associated with the line comment
throws:
  IllegalArgumentException - when null or an empty string is passed for start sequence of the line comment



getParseFlags
public int getParseFlags()(Code)
See the method description in TokenizerProperties . the current parser control flags
See Also:   AbstractTokenizerProperties.setParseFlags



getPattern
public TokenizerProperty getPattern(String pattern) throws IllegalArgumentException(Code)
Get the full description of a string property starting with the given prefix. The method returns null if the passed start parameter cannot be mapped to a known string description ( AbstractTokenizerProperties.stringExists would return false).
Parameters:
  pattern - the regular expression to be looked for the full pattern description or null
throws:
  IllegalArgumentException - when null or an emtpy pattern is passed



getPatternCompanion
public Object getPatternCompanion(String pattern) throws IllegalArgumentException(Code)
Retrieving the information associated with a given pattern. See the method description in TokenizerProperties .
Parameters:
  pattern - the regular expression to be removed the associated information or null
throws:
  IllegalArgumentException - when null or an emtpy patternis passed



getSpecialSequence
public TokenizerProperty getSpecialSequence(String specSeq) throws IllegalArgumentException(Code)
Get the full description of a special sequence property. See the method description in TokenizerProperties .
Parameters:
  specSeq - sequence to search the full sequence description or null
throws:
  IllegalArgumentException - if the given keyword is empty or null



getSpecialSequenceCompanion
public Object getSpecialSequenceCompanion(String specSeq) throws IllegalArgumentException(Code)
Retrieving the companion of the given special sequence. See the method description in TokenizerProperties .
Parameters:
  specSeq - sequence to remove the object associated with the special sequence
throws:
  IllegalArgumentException - if the given sequence is empty or null



getString
public TokenizerProperty getString(String start) throws IllegalArgumentException(Code)
Get the full description of a string property. See the method description in TokenizerProperties .
Parameters:
  start - the starting sequence of a string the full string description or null
throws:
  IllegalArgumentException - if the given keyword is empty or null



getStringCompanion
public Object getStringCompanion(String start) throws IllegalArgumentException(Code)
Retrieving the information associated with a certain string. See the method description in TokenizerProperties .
Parameters:
  start - the starting sequence of a string the associated information or null
throws:
  IllegalArgumentException - when null or an empty string is passed for start



handleEvent
protected void handleEvent(int type, String newValue, String oldValue)(Code)
The method fires the nessecary events when whitespace or separator sets change.
Parameters:
  type - token type
Parameters:
  newValue - the newly set value
Parameters:
  oldValue - the old value with case-sensitive handling



isFlagSet
public boolean isFlagSet(int flag)(Code)
Returns true if a given flag is set in the current parse flags. If the parameter contains more than one bit the method returns only true if all bits are set.
Parameters:
  flag - the flag to test true if all bits in flag are set.
See Also:   AbstractTokenizerProperties.setParseFlags



isFlagSet
public boolean isFlagSet(TokenizerProperty prop, int flag) throws NullPointerException(Code)
Checks if a given flag (see the constants in Flags ) is set for the given TokenizerProperty in the context of this TokenizerProperties instance.
Parameters:
  prop - the TokenizerProperty concerned
Parameters:
  flag - the flag to check (may contain more than one bit) true if the flag is set either explicit in the propertyor globally for this TokenizerProperties object, false otherwise
throws:
  NullPointerException - if no property is given



keywordExists
public boolean keywordExists(String keyword)(Code)
Checks if the given keyword is known to the Tokenizer. See the method description in TokenizerProperties .
Parameters:
  keyword - keyword to search true if the keyword is known,false otherwise



lineCommentExists
public boolean lineCommentExists(String lineComment)(Code)
Checks if the give line comment is known. See the method description in TokenizerProperties .
Parameters:
  lineComment - the starting sequence of the line comment true if the line comment is known, false otherwise



notifyListeners
protected void notifyListeners(TokenizerPropertyEvent event)(Code)
Notifying the registered listeners about a change in the properties. Listeners are called in the order of their registration (see AbstractTokenizerProperties.addTokenizerPropertyListener ).
Parameters:
  event - the TokenizerPropertyEvent to communicate to the listeners



patternExists
public boolean patternExists(String pattern)(Code)
Checks if the given pattern is known to the parser. See the method description in TokenizerProperties .
Parameters:
  pattern - the regular expression to be looked for true if the pattern is registered, false otherwise



propertyExists
public boolean propertyExists(TokenizerProperty property)(Code)
Checks if the given TokenizerProperty is known. See the method description in TokenizerProperties .
Parameters:
  property - the property to search true if the property is known,false otherwise



removeBlockComment
public void removeBlockComment(String start) throws IllegalArgumentException(Code)
Removing a certain block comment. See the method description in TokenizerProperties .
Parameters:
  start - the starting sequence of the block comment
throws:
  IllegalArgumentException - when null or an empty string is passed for start sequence of the block comment



removeKeyword
public void removeKeyword(String keyword) throws IllegalArgumentException(Code)
Deregistering a keyword. See the method description in TokenizerProperties .
Parameters:
  keyword - keyword to remove
throws:
  IllegalArgumentException - if the given keyword is empty or null



removeLineComment
public void removeLineComment(String lineComment) throws IllegalArgumentException(Code)
Removing a certain line comment. See the method description in TokenizerProperties .
Parameters:
  lineComment - the starting sequence of the line comment
throws:
  IllegalArgumentException - when null or an empty string is passed for start sequence of the line comment



removePattern
public void removePattern(String pattern) throws IllegalArgumentException(Code)
Removing a pattern. See the method description in TokenizerProperties .
Parameters:
  pattern - the regular expression to be removed
throws:
  IllegalArgumentException - when null or an empty string is passed



removeProperty
public void removeProperty(TokenizerProperty property) throws IllegalArgumentException(Code)
Deregistering a TokenizerProperty from the store. See the method description in TokenizerProperties .
Parameters:
  property - property to register
throws:
  IllegalArgumentException - when null, an incomplete or otherwise unusable property is passed



removeSeparators
public void removeSeparators(String separators) throws IllegalArgumentException(Code)
Removing separators from the existing set.
Parameters:
  separators - separating characters to remove from the separator set
throws:
  IllegalArgumentException - when null is passed or incompleteranges are specified (e.g. "a-")



removeSpecialSequence
public void removeSpecialSequence(String specSeq) throws IllegalArgumentException(Code)
Deregistering a special sequence from the parser. See the method description in TokenizerProperties .
Parameters:
  specSeq - sequence to remove
throws:
  IllegalArgumentException - if the given sequence is empty or null



removeString
public void removeString(String start) throws IllegalArgumentException(Code)
Removing a string description. See the method description in TokenizerProperties .
Parameters:
  start - the starting sequence of a string
throws:
  IllegalArgumentException - when null or an empty string is passed for start



removeTokenizerPropertyListener
public void removeTokenizerPropertyListener(TokenizerPropertyListener listener)(Code)
Removing a listener from the list of registered TokenizerPropertyListener instances. See the method description in TokenizerProperties .
Parameters:
  listener - the TokenizerPropertyListener to deregister
See Also:   AbstractTokenizerProperties.addTokenizerPropertyListener



removeWhitespaces
public void removeWhitespaces(String whitespaces) throws IllegalArgumentException(Code)
Removing whitespaces from the existing set.
Parameters:
  whitespaces - whitespaces to remove from the whitespace set
throws:
  IllegalArgumentException - when null is passed or incompleteranges are specified (e.g. "a-")



setParseFlags
public void setParseFlags(int flags)(Code)
See the method description in TokenizerProperties .
Parameters:
  flags - the parser control flags
See Also:   AbstractTokenizerProperties.getParseFlags



setSeparators
public void setSeparators(String separators)(Code)
Setting the separator character set of the tokenizer. See the method description in TokenizerProperties .
This method calls the abstract method AbstractTokenizerProperties.doSetSeparators . It guaranties that the parameter passed to doSetSeparators is not null (instead empty) and uppercase if the Flag Flags.F_NO_CASE is set.
Parameters:
  separators - the separator set



setWhitespaces
public void setWhitespaces(String whitespaces)(Code)
Setting the whitespace character set of the tokenizer. See the method description in TokenizerProperties .
This method calls the abstract method AbstractTokenizerProperties.doSetWhitespaces . It guaranties that the parameter passed to doSetWhitespaces is not null (instead empty) and uppercase if the Flag Flags.F_NO_CASE is set.
Parameters:
  whitespaces - the whitespace set



specialSequenceExists
public boolean specialSequenceExists(String specSeq)(Code)
Checks if the given special sequence is known to the Tokenizer. See the method description in TokenizerProperties .
Parameters:
  specSeq - sequence to check true if the block comment is known,false otherwise



stringExists
public boolean stringExists(String start)(Code)
Checks if the given starting sequence of the string is known to the parser. See the method description in TokenizerProperties .
Parameters:
  start - the starting sequence of a string true if the string is registered, false otherwise



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.