'Extract definition information from the Jedi definition object'

@staticmethod
def get_definition_info(defn):

    try:
        module_path = defn.module_path
        name = defn.name
        if hasattr(defn, 'line_nr'):
            line_nr = defn.line_nr
        else:
            line_nr = defn.line
        description = defn.description
        in_builtin = defn.in_builtin_module()
    except Exception as e:
        if DEBUG_EDITOR:
            log_last_error(LOG_FILENAME, ('Get    Defintion:    %s' % e))
        return None
    pattern = 'class\\s+{0}|def\\s+{0}|self.{0}\\s*=|{0}\\s*='.format(name)
    if (not re.match(pattern, description)):
        goto_next = True
    else:
        goto_next = False
    return dict(module_path=module_path, line_nr=line_nr, description=description, name=name, in_builtin=in_builtin, goto_next=goto_next)
