public class ValidatorFactory<G extends GameObject<G,A,R>,A extends MapArchObject<A>,R extends Archetype<G,A,R>>
extends java.lang.Object
Constructor and Description |
---|
ValidatorFactory(ValidatorPreferences validatorPreferences,
GameObjectMatchers gameObjectMatchers,
ProjectSettings projectSettings,
MapWriter<G,A,R> mapWriter)
Creates a new instance.
|
Modifier and Type | Method and Description |
---|---|
Validator<G,A,R> |
newValidator(java.lang.CharSequence spec)
Creates a new
Validator instance from string representation. |
public ValidatorFactory(@NotNull ValidatorPreferences validatorPreferences, @NotNull GameObjectMatchers gameObjectMatchers, @NotNull ProjectSettings projectSettings, @NotNull MapWriter<G,A,R> mapWriter)
validatorPreferences
- the validator preferences to pass to the
newly created validator instancesgameObjectMatchers
- the game object matchers for looking up game
object matcher instances from string representationprojectSettings
- the project settings to pass to the newly created
validator instancesmapWriter
- the map writer to pass to the newly created validator
instances@NotNull public Validator<G,A,R> newValidator(@NotNull java.lang.CharSequence spec) throws NoSuchValidatorException
Validator
instance from string representation.spec
- the string representationNoSuchValidatorException
- if the validator cannot be created