public SwitchInfo(String shortName, String longName, String description, boolean required, boolean flag, String defaultValue, Class<?> type) {
        if (StringUtils.isBlank(shortName) && StringUtils.isBlank(longName)) {
            throw new IllegalArgumentException("both short name and long name are null or empty");
        }
        String key = (!StringUtils.isBlank(shortName) ? shortName : longName);
        if (StringUtils.isBlank(description)) {
            throw new IllegalArgumentException("description is not specified for switch: " + key);
        }
        if (!required && StringUtils.isEmpty(defaultValue)) {
            throw new IllegalArgumentException("default value is not set for optional switch: " + key);
        }
        this.shortName = shortName;
        this.longName = longName;
        this.description = description;
        this.required = required;
        this.flag = flag;
        this.defaultValue = defaultValue;
        this.type = type;
    }