Class MapCheckerScriptChecker<G extends GameObject<G,A,R>,A extends MapArchObject<A>,R extends Archetype<G,A,R>>
- java.lang.Object
-
- net.sf.gridarta.model.validation.AbstractValidator<G,A,R>
-
- net.sf.gridarta.model.validation.checks.MapCheckerScriptChecker<G,A,R>
-
- All Implemented Interfaces:
MapValidator<G,A,R>,Validator<G,A,R>
public class MapCheckerScriptChecker<G extends GameObject<G,A,R>,A extends MapArchObject<A>,R extends Archetype<G,A,R>> extends AbstractValidator<G,A,R> implements MapValidator<G,A,R>
Executes a script to check a map. The script's output is parsed and converted into validation errors.
-
-
Field Summary
Fields Modifier and Type Field Description static @NotNull java.lang.StringMAP_PLACEHOLDERThe placeholder in the command's arguments for the map to check.static @NotNull java.lang.StringREAL_MAP_PLACEHOLDERThe placeholder in the command's arguments for the real map path.
-
Constructor Summary
Constructors Constructor Description MapCheckerScriptChecker(@NotNull ValidatorPreferences validatorPreferences, @NotNull MapWriter<G,A,R> mapWriter, @NotNull java.lang.String @NotNull [] args)Creates a new instance.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidvalidateMap(@NotNull MapModel<G,A,R> mapModel, @NotNull ErrorCollector<G,A,R> errorCollector)Validate a map.-
Methods inherited from class net.sf.gridarta.model.validation.AbstractValidator
getKey, isDefaultEnabled, isEnabled, setEnabled
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface net.sf.gridarta.model.validation.Validator
getKey, isDefaultEnabled, isEnabled, setEnabled
-
-
-
-
Field Detail
-
MAP_PLACEHOLDER
@NotNull public static final @NotNull java.lang.String MAP_PLACEHOLDER
The placeholder in the command's arguments for the map to check.- See Also:
- Constant Field Values
-
REAL_MAP_PLACEHOLDER
@NotNull public static final @NotNull java.lang.String REAL_MAP_PLACEHOLDER
The placeholder in the command's arguments for the real map path.- See Also:
- Constant Field Values
-
-
Constructor Detail
-
MapCheckerScriptChecker
public MapCheckerScriptChecker(@NotNull @NotNull ValidatorPreferences validatorPreferences, @NotNull @NotNull MapWriter<G,A,R> mapWriter, @NotNull @NotNull java.lang.String @NotNull [] args)Creates a new instance.- Parameters:
validatorPreferences- the validator preferences to usemapWriter- the map writer for saving temporary map filesargs- the command to execute and the arguments to pass
-
-
Method Detail
-
validateMap
public void validateMap(@NotNull @NotNull MapModel<G,A,R> mapModel, @NotNull @NotNull ErrorCollector<G,A,R> errorCollector)Description copied from interface:MapValidatorValidate a map.- Specified by:
validateMapin interfaceMapValidator<G extends GameObject<G,A,R>,A extends MapArchObject<A>,R extends Archetype<G,A,R>>- Parameters:
mapModel- Map to validateerrorCollector- Error collector to report errors to
-
-