org.wanghy.regex
Class RegexFactory

java.lang.Object
  extended byorg.wanghy.regex.RegexFactory

public final class RegexFactory
extends java.lang.Object

Factory of regular expressions. If JDK 1.4 or later is detected, creates a new instance of JdkRegex; otherwise creates a new instance of Perl5Regex.

Version:
$Revision: 1.2 $ $Date: 2005/03/09 01:59:58 $
Author:
Alex Ruiz

Constructor Summary
RegexFactory()
           
 
Method Summary
static Regex createRegex(java.lang.String regex)
          If JDK 1.4 or later is detected, creates a new instance of JdkRegex; otherwise creates a new instance of Perl5Regex.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

RegexFactory

public RegexFactory()
Method Detail

createRegex

public static Regex createRegex(java.lang.String regex)
If JDK 1.4 or later is detected, creates a new instance of JdkRegex; otherwise creates a new instance of Perl5Regex.

Parameters:
regex - the regular expression pattern to compile.
Returns:
a new regular expression matcher.


Copyright © 2005 Alex Ruiz. All Rights Reserved.