Extracts a LinkableClass from a jar.

    Args:
        jar: An open ZipFile instance.
        name: A string containing the binary name of a class.

    Raises:
        KeyError: The class does not exist in the jar.

def extract_class(jar, name):
    """Extracts a LinkableClass from a jar.

    Args:
        jar: An open ZipFile instance.
        name: A string containing the binary name of a class.

    Raises:
        KeyError: The class does not exist in the jar.
    """

    with jar.open(name) as entry:
        return LinkableClass(javatools.unpack_class(entry))