1 30 31 package de.susebox.jtopas; 32 33 import de.susebox.jtopas.spi.WhitespaceHandler; 37 import de.susebox.jtopas.spi.SeparatorHandler; 38 import de.susebox.jtopas.spi.KeywordHandler; 39 import de.susebox.jtopas.spi.SequenceHandler; 40 import de.susebox.jtopas.spi.PatternHandler; 41 42 43 47 161 public interface Tokenizer { 162 163 167 180 public void setSource(TokenizerSource source); 181 182 190 public TokenizerSource getSource(); 191 192 193 197 247 public void setTokenizerProperties(TokenizerProperties props) throws NullPointerException , IllegalArgumentException ; 248 249 250 258 public TokenizerProperties getTokenizerProperties(); 259 260 261 306 public void changeParseFlags(int flags, int mask) throws TokenizerException; 307 308 317 public int getParseFlags(); 318 319 335 public void setKeywordHandler(de.susebox.jtopas.spi.KeywordHandler handler); 336 337 345 public de.susebox.jtopas.spi.KeywordHandler getKeywordHandler(); 346 347 364 public void setWhitespaceHandler(de.susebox.jtopas.spi.WhitespaceHandler handler); 365 366 374 public de.susebox.jtopas.spi.WhitespaceHandler getWhitespaceHandler(); 375 376 377 394 public void setSeparatorHandler(de.susebox.jtopas.spi.SeparatorHandler handler); 395 396 404 public de.susebox.jtopas.spi.SeparatorHandler getSeparatorHandler(); 405 406 407 427 public void setSequenceHandler(de.susebox.jtopas.spi.SequenceHandler handler); 428 429 440 public de.susebox.jtopas.spi.SequenceHandler getSequenceHandler(); 441 442 443 460 public void setPatternHandler(de.susebox.jtopas.spi.PatternHandler handler); 461 462 470 public de.susebox.jtopas.spi.PatternHandler getPatternHandler(); 471 472 473 477 492 public boolean hasMoreToken(); 493 494 543 public Token nextToken() throws TokenizerException; 544 545 558 public String nextImage() throws TokenizerException; 559 560 575 public Token currentToken() throws TokenizerException; 576 577 595 public String currentImage() throws TokenizerException; 596 597 598 602 625 public int getLineNumber(); 626 627 638 public int getColumnNumber(); 639 640 641 645 657 public int getRangeStart(); 658 659 676 public int getReadPosition(); 677 678 685 public int currentlyAvailable(); 686 687 715 public String getText(int start, int length) throws IndexOutOfBoundsException ; 716 717 725 public char getChar(int pos) throws IndexOutOfBoundsException ; 726 727 739 public int readMore() throws TokenizerException; 740 741 766 public void setReadPositionAbsolute(int position) throws IndexOutOfBoundsException ; 767 768 786 public void setReadPositionRelative(int offset) throws IndexOutOfBoundsException ; 787 788 789 793 802 public void close(); 803 } 804 | Popular Tags |