def METHOD_NAME(
    yamlfile,
    output_directory=None,
    package=None,
    template_file=None,
    generate_records=False,
    head=True,
    emit_metadata=False,
    genmeta=False,
    classvars=True,
    slots=True,
    **args,
):
    """Generate java classes to represent a LinkML model"""
    JavaGenerator(
        yamlfile,
        package=package,
        template_file=template_file,
        generate_records=generate_records,
        emit_metadata=head,
        genmeta=genmeta,
        gen_classvars=classvars,
        gen_slots=slots,
        **args,
    ).serialize(output_directory, **args)