|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
ObjectRuleMatch
public class RuleMatch
A class that holds information about where a rule matches text.
| Constructor Summary | |
|---|---|
RuleMatch(Rule rule,
int fromPos,
int toPos,
String message)
|
|
RuleMatch(Rule rule,
int fromPos,
int toPos,
String message,
String shortMessage)
|
|
RuleMatch(Rule rule,
int fromPos,
int toPos,
String message,
String shortMessage,
boolean startWithUppercase)
Creates a RuleMatch object, taking the rule that triggered this match, position of the match and an explanation message. |
|
| Method Summary | |
|---|---|
int |
compareTo(RuleMatch other)
|
int |
getColumn()
Get the column number in which the match occurs. |
int |
getEndColumn()
Get the column number in which the match ends. |
int |
getEndLine()
Get the line number in which the match ends. |
int |
getFromPos()
Position of the start of the error (in characters). |
int |
getLine()
Get the line number in which the match occurs. |
String |
getMessage()
A human-readable explanation describing the error. |
int |
getOffset()
Get the character offset at which the match occurs. |
Rule |
getRule()
|
String |
getShortMessage()
A shorter human-readable explanation describing the error. |
List<String> |
getSuggestedReplacements()
The text fragments which might be an appropriate fix for the problem. |
int |
getToPos()
Position of the end of the error (in characters). |
void |
setColumn(int column)
Set the column number in which the match occurs. |
void |
setEndColumn(int endColumn)
Set the column number in which the match ends. |
void |
setEndLine(int endLine)
Set the line number in which the match ends. |
void |
setLine(int fromLine)
Set the line number in which the match occurs. |
void |
setOffset(int offset)
Set the character offset at which the match occurs. |
void |
setSuggestedReplacement(String repl)
|
void |
setSuggestedReplacements(List<String> repl)
|
String |
toString()
|
| Methods inherited from class Object |
|---|
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public RuleMatch(Rule rule,
int fromPos,
int toPos,
String message)
public RuleMatch(Rule rule,
int fromPos,
int toPos,
String message,
String shortMessage)
public RuleMatch(Rule rule,
int fromPos,
int toPos,
String message,
String shortMessage,
boolean startWithUppercase)
startWithUppercase - whether the original text at the position
of the match start with an uppercase character| Method Detail |
|---|
public Rule getRule()
public void setLine(int fromLine)
public int getLine()
public void setEndLine(int endLine)
public int getEndLine()
public void setColumn(int column)
public int getColumn()
public void setEndColumn(int endColumn)
public int getEndColumn()
public void setOffset(int offset)
public int getOffset()
public int getFromPos()
public int getToPos()
public String getMessage()
public String getShortMessage()
public void setSuggestedReplacement(String repl)
getSuggestedReplacements()public void setSuggestedReplacements(List<String> repl)
getSuggestedReplacements()public List<String> getSuggestedReplacements()
public String toString()
toString in class Objectpublic int compareTo(RuleMatch other)
compareTo in interface Comparable<RuleMatch>
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||