class ArtifactToComponentConverter {

    public static Component toComponent(Artifact artifact) {
        if (artifact == null) {
            throw new IllegalArgumentException("Artifact must not be null");
        }

        Component c = new Component();
        c.setType(Component.Type.LIBRARY);

        setCoordinatesForComponent(artifact, c);

        LicenseInformation licenses = ArtifactLicenseUtils.getFinalLicenses(artifact);
        addLicensesToComponent(licenses.getLicenses(), c);

        addHashesToComponent(artifact, c);

        if (c.getPurl() == null) {
            createGenericPurl(c, artifact);
        }

        return c;
    }

    private  ArtifactToComponentConverter();

}