Package de.susebox.jtopas.spi

Examples of de.susebox.jtopas.spi.PatternHandler


     
      _currStartPos += _currDataLength;
    }
   
    // check all pattern properties
    PatternHandler        ph      = (PatternHandler)_properties;
    PatternHandler.Result result;
   
    _currStartPos = 0;
    for (int index = 0; index < _patternMatchingStrings.length; ++index) {
      String                image    = _patternMatchingStrings[index];
      char[]                complete = { ';' };
     
      _currDataLength = image.length();
      System.arraycopy(image.toCharArray(), 0, _currData, _currStartPos, _currDataLength);
      result = ph.matches(new LocalDataProvider(this));
      assertTrue("Pattern matching failed for: " + image, result != null );
      assertTrue("Pattern matching returned wrong length: " + result.getLengthOfMatch(), result.getLengthOfMatch() == image.length());
      System.arraycopy(complete, 0, _currData, _currStartPos + _currDataLength, complete.length);
      _currDataLength += complete.length;
      result = ph.matches(new LocalDataProvider(this));
      assertTrue("Pattern matching failed for: " + image, result != null);
      assertTrue("Pattern matching returned wrong length: " + result.getLengthOfMatch(), result.getLengthOfMatch() == image.length());
      _currStartPos   += _currDataLength;
    }
  }
View Full Code Here

TOP

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

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.