Clover coverage report - Code Coverage for tapestry release 4.0-beta-8
Coverage timestamp: Sat Sep 24 2005 11:50:34 EDT
file stats: LOC: 57   Methods: 4
NCLOC: 22   Classes: 1
 
 Source file Conditionals Statements Methods TOTAL
RegexpMatch.java - 100% 100% 100%
coverage
 1    // Copyright 2005 The Apache Software Foundation
 2    //
 3    // Licensed under the Apache License, Version 2.0 (the "License");
 4    // you may not use this file except in compliance with the License.
 5    // You may obtain a copy of the License at
 6    //
 7    // http://www.apache.org/licenses/LICENSE-2.0
 8    //
 9    // Unless required by applicable law or agreed to in writing, software
 10    // distributed under the License is distributed on an "AS IS" BASIS,
 11    // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 12    // See the License for the specific language governing permissions and
 13    // limitations under the License.
 14   
 15    package org.apache.tapestry.util;
 16   
 17    import org.apache.oro.text.regex.MatchResult;
 18   
 19    /**
 20    * A "friendly" version of a regular expression match.
 21    *
 22    * @author Howard Lewis Ship
 23    * @since 4.0
 24    */
 25    public class RegexpMatch
 26    {
 27    private final MatchResult _match;
 28   
 29  18 RegexpMatch(MatchResult match)
 30    {
 31  18 _match = match;
 32    }
 33   
 34    /**
 35    * Returns a matching group within the input string. Group 0 is the entire input string, group 1
 36    * is the content with the first expression, etc.
 37    */
 38   
 39  33 public String getGroup(int group)
 40    {
 41  33 return _match.group(group);
 42    }
 43   
 44    /**
 45    * Returns the entire matching input.
 46    */
 47   
 48  3 public String getInput()
 49    {
 50  3 return _match.toString();
 51    }
 52   
 53  15 public int getMatchLength()
 54    {
 55  15 return _match.length();
 56    }
 57    }