private Handler createAdminServlet0(Server server, Environment environment, MetricRegistry metrics) {
        final MutableServletContextHandler adminContext = environment.getAdminContext();
        final HealthCheckRegistry healthChecks = environment.healthChecks();
        try {
            final Method method = AbstractServerFactory.class.getDeclaredMethod(
                    "createAdminServlet", Server.class, MutableServletContextHandler.class,
                    MetricRegistry.class, HealthCheckRegistry.class, AdminEnvironment.class);
            logger.debug("createAdminServlet resolves to Dropwizard v2.1.");
            final AdminEnvironment adminEnvironment = environment.admin();
            return (Handler) method.invoke(this, server, adminContext, metrics, healthChecks, adminEnvironment);
        } catch (NoSuchMethodException e) {
            // ignore
        } catch (IllegalAccessException | InvocationTargetException e) {
            return Exceptions.throwUnsafely(e);
        }

        try {
            //noinspection JavaReflectionMemberAccess - this is false warning on dropwizard2 module
            final Method method = AbstractServerFactory.class.getDeclaredMethod(
                    "createAdminServlet", Server.class, MutableServletContextHandler.class,
                    MetricRegistry.class, HealthCheckRegistry.class);
            logger.debug("createAdminServlet resolves to Dropwizard v1 or v2.0.");
            return (Handler) method.invoke(this, server, adminContext, metrics, healthChecks);
        } catch (IllegalAccessException | NoSuchMethodException | InvocationTargetException e) {
            return Exceptions.throwUnsafely(e);
        }
    }
a helper method to facilitate the signature change in {@link AbstractServerFactory} in release 2.1, where
the 5th {@link AdminEnvironment} param is added.
dropwizard2/src/main/java/com/linecorp/armeria/dropwizard/ArmeriaServerFactory.java