org.codehaus.mojo.taglist.tags
Class IgnoreCaseTag

java.lang.Object
  extended by org.codehaus.mojo.taglist.tags.AbsTag
      extended by org.codehaus.mojo.taglist.tags.IgnoreCaseTag

public class IgnoreCaseTag
extends AbsTag

The ignore case tag class. This class defines a "case insensitive" match tag. This tag will match if the characters (upper or lower case) in the string listed is found within the scanned lines. Example POM:

   
       ...
       fixme
      ignoreCase
       ...
   
  
Example Java code with match:
     * fixme this will match.
     * FIXME this will match.
     * Fixme this will match.
  
Example Java code without match:
     * @tdoo this will NOT match.
  


Field Summary
 
Fields inherited from class org.codehaus.mojo.taglist.tags.AbsTag
tagString
 
Constructor Summary
IgnoreCaseTag(String tagString)
          Constructor.
 
Method Summary
 int contains(String currentLine, Locale locale)
          Check to see if the string contains this tag.
 int getLastTagMatchLength()
          Return the length of the last matched tag.
 boolean startsWith(String currentLine, Locale locale)
          Check to see if the string starts with this tag.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

IgnoreCaseTag

public IgnoreCaseTag(String tagString)
Constructor.

Parameters:
tagString - the string to match against for this tag.
Method Detail

contains

public int contains(String currentLine,
                    Locale locale)
Check to see if the string contains this tag. If there is a match, return the index within the string; otherwise, return NO_MATCH.

Specified by:
contains in class AbsTag
Parameters:
currentLine - the string for the current line being scanned.
locale - the Locale of the currentLine.
Returns:
the index within the string of the matched tag, or TagClass.NO_MATCH if not match was found.

startsWith

public boolean startsWith(String currentLine,
                          Locale locale)
Check to see if the string starts with this tag.

Specified by:
startsWith in class AbsTag
Parameters:
currentLine - the string for the current line being scanned.
locale - the Locale of the currentLine.
Returns:
true if the string starts with this tag.

getLastTagMatchLength

public int getLastTagMatchLength()
Return the length of the last matched tag. In the case of a ignore case tag, this is always the length of the tag.

Specified by:
getLastTagMatchLength in class AbsTag
Returns:
the length of the last matched tag.


Copyright © 2005-2012 Codehaus. All Rights Reserved.