org.acmsl.regexpplugin.jakartaoro
Class Perl5MatcherOROAdapter

java.lang.Object
  |
  +--org.acmsl.regexpplugin.jakartaoro.Perl5MatcherOROAdapter
All Implemented Interfaces:
Matcher, org.acmsl.version.Versionable

public class Perl5MatcherOROAdapter
extends java.lang.Object
implements Matcher

Jakarta ORO-specific regexp compiler adapter. This class makes possible the use of ORO compilers inside this API. A delegation is used because Perl5Compiler is a final class.

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.
 
Constructor Summary
Perl5MatcherOROAdapter()
          Constructs a Perl5MatcherOROAdapter for given object.
 
Method Summary
 boolean contains(java.lang.String text, Pattern pattern)
          Checks if given text contains specified pattern.
static org.acmsl.version.Version getClassVersion()
          Retrieves the current version of this class.
protected  org.apache.oro.text.regex.Perl5Matcher getDelegatedInstance()
          Retrieves an instance of Perl5Matcher class.
 MatchResult getMatch()
          Retrieves the last match found due to a previous call to contains method.
 org.acmsl.version.Version getVersion()
          Retrieves the current version of this object.
protected  void setAdaptee(org.apache.oro.text.regex.Perl5Matcher adaptee)
          Sets the adaptee.
 
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

Perl5MatcherOROAdapter

public Perl5MatcherOROAdapter()
Constructs a Perl5MatcherOROAdapter for given object.

Method Detail

contains

public boolean contains(java.lang.String text,
                        Pattern pattern)
Checks if given text contains specified pattern.

Specified by:
contains in interface Matcher
Parameters:
text - the text to analyze.
pattern - the regular expression to apply.
Returns:
true if the pattern is found.

getMatch

public MatchResult getMatch()
Retrieves the last match found due to a previous call to contains method.

Specified by:
getMatch in interface Matcher
Returns:
such match result.

getDelegatedInstance

protected org.apache.oro.text.regex.Perl5Matcher getDelegatedInstance()
Retrieves an instance of Perl5Matcher class.

Returns:
a the adapted matcher.

setAdaptee

protected void setAdaptee(org.apache.oro.text.regex.Perl5Matcher adaptee)
Sets the adaptee.

Parameters:
adaptee - the matcher to adapt.

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.