All Downloads are FREE. Search and download functionalities are using the official Maven repository.

cdc.issues.io.ProfileIoFactory Maven / Gradle / Ivy

There is a newer version: 0.62.0
Show newest version
package cdc.issues.io;

import cdc.util.lang.FailureReaction;
import cdc.util.lang.Introspection;

/**
 * Factory of {@link ProfileIo}.
 *
 * @author Damien Carbonne
 */
public final class ProfileIoFactory {
    private ProfileIoFactory() {
    }

    /**
     * Creates an instance of {@link ProfileIo} configured with {@link ProfileIoFeatures}.
     *
     * @param features The features.
     * @return An instance of {@link ProfileIo} configured with {@code features}.
     */
    public static ProfileIo create(ProfileIoFeatures features) {
        final Class cls =
                Introspection.uncheckedCast(Introspection.getClass("cdc.issues.core.io.ProfileIoImpl",
                                                                   ProfileIo.class,
                                                                   FailureReaction.FAIL));
        final Class[] parameterTypes = { ProfileIoFeatures.class };
        return Introspection.newInstance(cls,
                                         parameterTypes,
                                         FailureReaction.FAIL,
                                         features);
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy