Class Validator

    • Constructor Detail

      • Validator

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

      • getName

        public String getName()
        Returns the name of an entry that is used in case of validation error.
        Returns:
        name the name of the entry.
      • validate

        public void validate​(Object obj)
                      throws InvalidConfigException
        Checks the validity of the given value for the entry. This method does basic checks such as null ness & type.
        Parameters:
        obj - the object to check validation for
        Throws:
        InvalidConfigException