org.acmsl.regexpplugin.jakartaregexp
Class MatchResultRegexpAdapter

java.lang.Object
  |
  +--org.acmsl.regexpplugin.jakartaregexp.MatchResultRegexpAdapter
All Implemented Interfaces:
MatchResult, org.acmsl.version.Versionable

public class MatchResultRegexpAdapter
extends java.lang.Object
implements MatchResult

Represents the result of match in a regexp parsing process using Jakarta Regexp package.

Version:
$Revision: 1.5 $
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
MatchResultRegexpAdapter(org.apache.regexp.RE matchResult)
          Constructs a REMatchResultRegexpAdapter from given Jakarta Regexp-specific instance.
 
Method Summary
 org.apache.regexp.RE getAdaptee()
          Retrieves the adapted instance.
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.
 java.lang.String group(int group)
          Taken from Jakarta Regexp javadoc: Gets the contents of a parenthesized subexpression after a successful match.
 int groups()
          Taken from Jakarta Regexp 1.2 javadoc: Returns the number of parenthesized subexpressions available after a successful match..
protected  void setAdaptee(org.apache.regexp.RE matchResult)
          Sets the instance to adapt.
 
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

MatchResultRegexpAdapter

public MatchResultRegexpAdapter(org.apache.regexp.RE matchResult)
Constructs a REMatchResultRegexpAdapter from given Jakarta Regexp-specific instance.

Parameters:
matchResult - Jakarta Regexp match result object to adapt.
Method Detail

setAdaptee

protected void setAdaptee(org.apache.regexp.RE matchResult)
Sets the instance to adapt.

Parameters:
matchResult - the adaptee.

getAdaptee

public org.apache.regexp.RE getAdaptee()
Retrieves the adapted instance.

Returns:
such instance.

group

public java.lang.String group(int group)
Taken from Jakarta Regexp javadoc: Gets the contents of a parenthesized subexpression after a successful match.

Specified by:
group in interface MatchResult
Parameters:
group - Nesting level of subexpression.
Returns:
A string containing the indicated pattern subgroup.

groups

public int groups()
Taken from Jakarta Regexp 1.2 javadoc: Returns the number of parenthesized subexpressions available after a successful match..

Specified by:
groups in interface MatchResult
Returns:
such value.

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.