Package de.susebox.jtopas.spi

Examples of de.susebox.jtopas.spi.DataProvider


   * @return  number of whitespace characters starting from the given offset
   * @throws  TokenizerException failure while reading data from the input stream
   */
  protected int readWhitespaces(int startingAtPos, int maxChars) throws TokenizerException {
    if (_whitespaceHandler != null) {
      DataProvider dataProvider = getBaseDataProvider(startingAtPos, maxChars);
      return _whitespaceHandler.countLeadingWhitespaces(dataProvider);
    } else {
      return 0;
    }
  }
View Full Code Here


   * @throws  TokenizerException routed exception from the active {@link de.susebox.jtopas.spi.KeywordHandler}
   * @return  {@link TokenizerProperty} describing the keyword or <code>null</code>
   */
  protected TokenizerProperty isKeyword(int startingAtPos, int length) throws TokenizerException {
    if (_keywordHandler != null) {
      DataProvider dataProvider = getBaseDataProvider(startingAtPos, length);
      return _keywordHandler.isKeyword(dataProvider);
    } else {
      return null;
    }
  }
View Full Code Here

          break;
        }
      }

      // try pattern matching
      DataProvider          dataProvider  = getBaseDataProvider(startingAtPos, _currentWritePos - startingAtPos);
      PatternHandler.Result result        = _patternHandler.matches(dataProvider);
      boolean               isFree        = (result != null) ? isFlagSet(result.getProperty(), Flags.F_FREE_PATTERN) : false;
     
      if (result != null && (isFree || ! freePatternOnly)) {
        if ( ! isFree) {
View Full Code Here

          break;
        }
      }
     
      // invoke the sequence handler
      DataProvider      dataProvider = getBaseDataProvider(startingAtPos, _currentWritePos - startingAtPos);
      TokenizerProperty prop         = _sequenceHandler.startsWithSequenceCommentOrString(dataProvider);
   
      if (prop != null) {
        _scannedToken[1] = new Token(prop.getType(), null, prop);
        return true;
View Full Code Here

TOP

Related Classes of de.susebox.jtopas.spi.DataProvider

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.