edu.rice.cs.drjava.model.definitions.indent
Class QuestionCurrLineStartsWithSkipComments
java.lang.Object
|
+--edu.rice.cs.drjava.model.definitions.indent.IndentRuleQuestion
|
+--edu.rice.cs.drjava.model.definitions.indent.QuestionCurrLineStartsWithSkipComments
- All Implemented Interfaces:
- IndentRule
- public class QuestionCurrLineStartsWithSkipComments
- extends IndentRuleQuestion
Determines whether or not the current line in the document starts
with a specific character sequence, skipping over any comments on that line.
The character sequence is passed to the constructor of the class as a String
argument.
- Version:
- $Id: QuestionCurrLineStartsWithSkipComments.java,v 1.6 2002/07/22 22:50:41 csreis Exp $
Method Summary |
(package private) boolean |
applyRule(DefinitionsDocument doc)
Determines whether or not the current line in the document starts
with the character sequence specified by the String field _prefix,
skipping over any comments on that line. |
Methods inherited from class java.lang.Object |
, clone, equals, finalize, getClass, hashCode, notify, notifyAll, registerNatives, toString, wait, wait, wait |
_prefix
private String _prefix
- The String to be matched. This String may not contain whitespace characters
or comment-delimiting characters.
QuestionCurrLineStartsWithSkipComments
public QuestionCurrLineStartsWithSkipComments(String prefix,
IndentRule yesRule,
IndentRule noRule)
- Parameters:
yesRule
- The decision subtree for the case that this rule applies
in the current context.noRule
- The decision subtree for the case that this rule does not
apply in the current context.
applyRule
boolean applyRule(DefinitionsDocument doc)
- Determines whether or not the current line in the document starts
with the character sequence specified by the String field _prefix,
skipping over any comments on that line.
- Overrides:
applyRule
in class IndentRuleQuestion
- Parameters:
doc
- The DefinitionsDocument containing the current line.- Returns:
- True iff the current line in the document starts with the
character sequence specified by the String field _prefix.