Class StringValidator

  • Direct Known Subclasses:
    RepositoryNameValidator

    public class StringValidator
    extends Validator
    Validator class for domain config entries whose type is java.lang.String.
    • Constructor Detail

      • StringValidator

        public StringValidator​(String name)
        Constructs new StringValidator object.
        Parameters:
        name - Name of an entry that is used in case of validation errors. If the name is null "" is used instead.
    • Method Detail

      • validate

        public void validate​(Object str)
                      throws InvalidConfigException
        Validates the given value for the given entry.This method first invokes its superclass's validate method and then checks additional string validations such as 0 length.
        Overrides:
        validate in class Validator
        Parameters:
        str - the value to validate
        Throws:
        InvalidConfigException