@classmethod
def add_from_case_control(cls, line, line_upper, lines, i):
    """add method used by the CaseControl class"""
    equals_count = line.count('=')
    if cls.allow_equals:
        if equals_count == 1:
            line_upper = line_upper.replace(' ', '')
            key, value, options = cls._parse_single_equals(line, line_upper,
                lines, i)
        elif equals_count >= 2 and '(' in line:
            key, value, options = cls._parse_multi_equals(line, line_upper,
                lines, i)
        else:
            raise RuntimeError('equals_count=%s; line = %r' % (equals_count,
                line))
    else:
        value = None
        if '(' in line_upper:
            class_name, options_str = line_upper.strip(')').split('(')
            options = options_str.split(',')
        else:
            class_name = line_upper
            assert class_name == 'OUTPUT', class_name
            options = []
        key = class_name
    return cls(key, value, options)
