org.acmsl.regexpplugin
Class RegexpManager

java.lang.Object
  |
  +--org.acmsl.regexpplugin.RegexpManager
All Implemented Interfaces:
org.acmsl.version.Versionable

public final class RegexpManager
extends java.lang.Object
implements org.acmsl.version.Versionable

Generic class that manages which regexp engine to use.

Version:
$Revision: 1.12 $
Author:
Jose San Leandro Armend?riz

Field Summary
protected static int COMPILER
          Compiler position in the array object.
protected static int ENGINE_VERSION
          Engine version position in the array object.
protected static int HELPER
          Helper result position in the array object.
protected static int MATCHER
          Match result position in the array object.
protected static int NAME
          Engine name position in the array object.
protected static int PACKAGE
          Engine class package position in the array object.
static org.acmsl.version.Version VERSION
          Concrete version object updated everytime it's checked-in in a CVS repository.
 
Method Summary
static Compiler createCompiler()
          Creates a new compiler.
static Helper createHelper()
          Creates a new helper instance.
static Matcher createMatcher()
          Creates a new pattern matcher.
protected static Compiler createSpecificCompiler(java.lang.String[] engine)
          Creates a compiler determined by given class name.
protected static Helper createSpecificHelper(java.lang.String[] engine)
          Creates a compiler determined by given class name.
static org.acmsl.version.Version getClassVersion()
          Retrieves the current version of this class.
protected  java.lang.String[] getEngine()
          Retrieves current engine information.
 org.acmsl.version.Version getVersion()
          Retrieves the current version of this object.
protected  void setEngine(java.lang.String[] engine)
          Sets the current engine.
static void useGNURegexp()
          Sets GNU Regexp implementation to be the engine used.
static void useJakartaOroAwk()
          Deprecated. Awk engine is not working correctly!
static void useJakartaOroPerl5()
          Sets Jakarta ORO Perl5 implementation to be the engine used.
static void useJakartaRegexp()
          Sets Jakarta Regexp implementation to be the engine used.
static void useJDK14Regexp()
          Sets JDK1.4 regexp implementation to be the engine used.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

NAME

protected static final int NAME
Engine name position in the array object.

See Also:
Constant Field Values

ENGINE_VERSION

protected static final int ENGINE_VERSION
Engine version position in the array object.

See Also:
Constant Field Values

PACKAGE

protected static final int PACKAGE
Engine class package position in the array object.

See Also:
Constant Field Values

COMPILER

protected static final int COMPILER
Compiler position in the array object.

See Also:
Constant Field Values

MATCHER

protected static final int MATCHER
Match result position in the array object.

See Also:
Constant Field Values

HELPER

protected static final int HELPER
Helper result position in the array object.

See Also:
Constant Field Values

VERSION

public static final org.acmsl.version.Version VERSION
Concrete version object updated everytime it's checked-in in a CVS repository.

Method Detail

getEngine

protected java.lang.String[] getEngine()
Retrieves current engine information.

Returns:
the engine information.

setEngine

protected void setEngine(java.lang.String[] engine)
Sets the current engine.

Parameters:
engine - the engine information.

useJakartaOroPerl5

public static void useJakartaOroPerl5()
Sets Jakarta ORO Perl5 implementation to be the engine used.


useJakartaOroAwk

public static void useJakartaOroAwk()
Deprecated. Awk engine is not working correctly!

Sets Jakarta ORO Awk implementation to be the engine used.


useJakartaRegexp

public static void useJakartaRegexp()
Sets Jakarta Regexp implementation to be the engine used.


useJDK14Regexp

public static void useJDK14Regexp()
Sets JDK1.4 regexp implementation to be the engine used.


useGNURegexp

public static void useGNURegexp()
Sets GNU Regexp implementation to be the engine used.


createCompiler

public static Compiler createCompiler()
                               throws RegexpEngineNotFoundException
Creates a new compiler.

Returns:
the new compiler.
Throws:
RegexpEngineNotFoundException - whenever the instantiation of the engine classes fails.

createHelper

public static Helper createHelper()
                           throws RegexpEngineNotFoundException
Creates a new helper instance.

Returns:
such kind of object.
Throws:
RegexpEngineNotFoundException - whenever the instantiation of the engine classes fails.

createSpecificCompiler

protected static Compiler createSpecificCompiler(java.lang.String[] engine)
                                          throws RegexpEngineNotFoundException
Creates a compiler determined by given class name.

Returns:
the compiler object, or null if the class name is incorrect.
Throws:
RegexpEngineNotFoundException - whenever the instantiation of the engine classes fails.

createSpecificHelper

protected static Helper createSpecificHelper(java.lang.String[] engine)
                                      throws RegexpEngineNotFoundException
Creates a compiler determined by given class name.

Returns:
the compiler object, or null if the class name is incorrect.
Throws:
RegexpEngineNotFoundException - whenever the instantiation of the engine classes fails.

createMatcher

public static Matcher createMatcher()
                             throws RegexpEngineNotFoundException
Creates a new pattern matcher.

Returns:
the new matcher.
Throws:
RegexpEngineNotFoundException - whenever the instantiation of the engine classes fails.

getVersion

public org.acmsl.version.Version getVersion()
Retrieves the current version of this object.

Specified by:
getVersion in interface org.acmsl.version.Versionable
Returns:
the version object with such information.

getClassVersion

public static org.acmsl.version.Version getClassVersion()
Retrieves the current version of this class.

Returns:
the object with class version information.


Copyright © 2003 ACM S.L.. All Rights Reserved.