org.prorefactor.core
Class CommentFinder

java.lang.Object
  extended by org.prorefactor.core.CommentFinder

public class CommentFinder
extends java.lang.Object

Use this class to find specific comments in, before, or after a node hierarchy. See org.prorefactor.refactor.unittest.NoUndoT.java (and its data file) for a complete unit test and example for this class. Currently the only search option is a case insensitive search.


Constructor Summary
CommentFinder()
           
 
Method Summary
 int commentTextReview(ProToken t)
          Review the text of current comment, to see if it matches.
 int examineAfter(JPNode node)
          Find comments which come after the last descendant of the node, which match, and are not separated from that last sibling by any newline characters.
 int examineBefore(JPNode node)
          Find comments before the node which match and are not separated from the node by any blank lines.
 int examineInner(JPNode node)
          Find comments before the node which match.
 int search(JPNode node)
          Return the number of COMMENT tokens which meet the search criteria
 void setFindString(java.lang.String input)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CommentFinder

public CommentFinder()
Method Detail

commentTextReview

public int commentTextReview(ProToken t)
Review the text of current comment, to see if it matches.


examineAfter

public int examineAfter(JPNode node)
Find comments which come after the last descendant of the node, which match, and are not separated from that last sibling by any newline characters.

Parameters:
node -
Returns:
number of COMMENT tokens which match.

examineBefore

public int examineBefore(JPNode node)
Find comments before the node which match and are not separated from the node by any blank lines.

Parameters:
node -
Returns:
number of COMMENT tokens which match.

examineInner

public int examineInner(JPNode node)
Find comments before the node which match.

Parameters:
node -
Returns:
number of COMMENT tokens which match.

setFindString

public void setFindString(java.lang.String input)

search

public int search(JPNode node)
Return the number of COMMENT tokens which meet the search criteria



Copyright © 2008 Joanju Software. All Rights Reserved.