Class ErrorGenerator<G extends GameObject<G,A,R>,A extends MapArchObject<A>,R extends Archetype<G,A,R>>
- java.lang.Object
-
- net.sf.gridarta.var.crossfire.model.validation.checks.ErrorGenerator<G,A,R>
-
- Type Parameters:
G- the game object type of the objectA- the map arch object type of the objectR- the archetype type of the object
public class ErrorGenerator<G extends GameObject<G,A,R>,A extends MapArchObject<A>,R extends Archetype<G,A,R>> extends java.lang.ObjectGenerator forSuspiciousMsgCheckerrelated error messages.
-
-
Constructor Summary
Constructors Constructor Description ErrorGenerator(@NotNull ErrorCollector<G,A,R> errorCollector, G gameObject)Creates a new instance.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voiderrorKeywordError(@NotNull java.lang.String reason)Reports a keyword related error.voiderrorMatchAllText()Adds a new error message for an '@match *' line with text following the '*'.voiderrorRegEx(@NotNull java.lang.String message)Adds a new error message for an incorrect or suspicious regular expression.voiderrorSyntaxError(@NotNull java.lang.String reason)Reports a general syntax error.voidsetCurrentLine(@NotNull java.lang.String line)Sets the line currently being analyzed.
-
-
-
Constructor Detail
-
ErrorGenerator
public ErrorGenerator(@NotNull @NotNull ErrorCollector<G,A,R> errorCollector, @NotNull G gameObject)Creates a new instance.- Parameters:
errorCollector- the error collector to which the error messages are addedgameObject- the game object to which the error messages apply
-
-
Method Detail
-
setCurrentLine
public void setCurrentLine(@NotNull @NotNull java.lang.String line)Sets the line currently being analyzed. It will be used as context for all further error messages. This function may be called multiple times and affects only error messages generated afterwards.- Parameters:
line- the line that is currently being analyzed
-
errorRegEx
public void errorRegEx(@NotNull @NotNull java.lang.String message)Adds a new error message for an incorrect or suspicious regular expression.- Parameters:
message- the error reason
-
errorMatchAllText
public void errorMatchAllText()
Adds a new error message for an '@match *' line with text following the '*'.
-
errorSyntaxError
public void errorSyntaxError(@NotNull @NotNull java.lang.String reason)Reports a general syntax error.- Parameters:
reason- the syntax error
-
errorKeywordError
public void errorKeywordError(@NotNull @NotNull java.lang.String reason)Reports a keyword related error.- Parameters:
reason- the reason
-
-