org.acmsl.regexpplugin
Interface Compiler

All Superinterfaces:
org.acmsl.version.Versionable
All Known Implementing Classes:
AwkCompilerOROAdapter, CompilerGNUAdapter, CompilerRegexpAdapter, Perl5CompilerOROAdapter

public interface Compiler
extends org.acmsl.version.Versionable

Represents a regexp compiler. Different implementations vary but they all must respect this set of methods.

Version:
$Revision: 1.6 $
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.
 
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.
 boolean isCaseSensitive()
          Retrieves if the compiler is configured to be case sensitive or not.
 boolean isMultiline()
          Retrieves if the compiler is configured to 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 interface org.acmsl.version.Versionable
getVersion
 

Field Detail

VERSION

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

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.

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.

Parameters:
caseSensitive - true for differentiate upper from lower case.

isCaseSensitive

public boolean isCaseSensitive()
Retrieves if the compiler is configured to be case sensitive or not.

Returns:
true if the compiler differentiates upper from lower case.

setMultiline

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

Parameters:
multiline - false for parsing each line at a time.

isMultiline

public boolean isMultiline()
Retrieves if the compiler is configured to care about new line delimiters or not.

Returns:
true if the compiler understands new line delimiters.


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