class PartitionAssignorAdapter implements ConsumerPartitionAssignor {

    public static List<ConsumerPartitionAssignor> getAssignorInstances(List<String> assignorClasses, Map<String, Object> configs) {
        List<ConsumerPartitionAssignor> assignors = new ArrayList<>();

        if (assignorClasses == null)
            return assignors;

        for (Object klass : assignorClasses) {
            // first try to get the class if passed in as a string
            if (klass instanceof String) {
                try {
                    klass = Class.forName((String) klass, true, Utils.getContextOrKafkaClassLoader());
                } catch (ClassNotFoundException classNotFound) {
                    throw new KafkaException(klass + " ClassNotFoundException exception occurred", classNotFound);
                }
            }

            if (klass instanceof Class<?>) {
                Object assignor = Utils.newInstance((Class<?>) klass);
                if (assignor instanceof Configurable)
                    ((Configurable) assignor).configure(configs);

                if (assignor instanceof ConsumerPartitionAssignor) {
                    assignors.add((ConsumerPartitionAssignor) assignor);
                } else if (assignor instanceof PartitionAssignor) {
                    assignors.add(new PartitionAssignorAdapter((PartitionAssignor) assignor));
                    LOG.warn("The PartitionAssignor interface has been deprecated, "
                        + "please implement the ConsumerPartitionAssignor interface instead.");
                } else {
                    throw new KafkaException(klass + " is not an instance of " + PartitionAssignor.class.getName()
                        + " or an instance of " + ConsumerPartitionAssignor.class.getName());
                }
            } else {
                throw new KafkaException("List contains element of type " + klass.getClass().getName() + ", expected String or Class");
            }
        }
        return assignors;
    }

      PartitionAssignorAdapter(PartitionAssignor oldAssignor);

}