org.acmsl.regexpplugin.gnuregexp
Class CompilerGNUAdapter

java.lang.Object
  |
  +--org.acmsl.regexpplugin.gnuregexp.CompilerGNUAdapter
All Implemented Interfaces:
Compiler, org.acmsl.version.Versionable

public class CompilerGNUAdapter
extends java.lang.Object
implements Compiler

GNU Regexp 1.1.4-specific compiler adapter. This class makes possible the use of GNU Regexp 1.1.4 compilers inside this API.

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

Field Summary
static org.acmsl.version.Version VERSION
          Concrete version object updated everytime it's checked-in in a CVS repository.
 
Constructor Summary
CompilerGNUAdapter()
           
 
Method Summary
 Pattern compile(java.lang.String regexp)
          Compiles given regular expression and creates a Pattern object to apply such rule on concrete text contents.
static org.acmsl.version.Version getClassVersion()
          Retrieves the current version of this class.
 org.acmsl.version.Version getVersion()
          Retrieves the current version of this object.
 boolean isCaseSensitive()
          Retrieves whether the compiler should care about case sensitiveness or not.
 boolean isMultiline()
          Sets whether the compiler should care about new line delimiters or not.
 void setCaseSensitive(boolean caseSensitive)
          Sets whether the compiler should care about case sensitiveness or not.
 void setMultiline(boolean multiline)
          Sets whether the compiler should care about new line delimiters or not.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

VERSION

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

Constructor Detail

CompilerGNUAdapter

public CompilerGNUAdapter()
Method Detail

compile

public Pattern compile(java.lang.String regexp)
                throws MalformedPatternException
Compiles given regular expression and creates a Pattern object to apply such rule on concrete text contents.

Specified by:
compile in interface Compiler
Parameters:
regexp - the regular expression to compile.
Returns:
the Pattern associated to such regular expression.
Throws:
MalformedPatternException - if given regexp is malformed.

setCaseSensitive

public void setCaseSensitive(boolean caseSensitive)
Sets whether the compiler should care about case sensitiveness or not.

Specified by:
setCaseSensitive in interface Compiler
Parameters:
caseSensitive - true for differentiate upper from lower case.

isCaseSensitive

public boolean isCaseSensitive()
Retrieves whether the compiler should care about case sensitiveness or not.

Specified by:
isCaseSensitive in interface Compiler
Returns:
true if upper from lower cases are processed differently.

setMultiline

public void setMultiline(boolean multiline)
Sets whether the compiler should care about new line delimiters or not.

Specified by:
setMultiline in interface Compiler
Parameters:
multiline - false for parsing each line at a time.

isMultiline

public boolean isMultiline()
Sets whether the compiler should care about new line delimiters or not.

Specified by:
isMultiline in interface Compiler
Returns:
false if the engine parses each line one at a time.

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.