class Main {

    @VisibleForTesting
    static F<P2<Exports, Transforms>, F<MethodDescription.InDefinedShape, P2<Exports, Transforms>>> gather(ByteBuddy bb, Compoundable comp) {
        final Export.Default export = Export.Default.of(bb);
        final Transform.Default transform = Transform.Default.of(bb, comp);

        return pair -> md -> {

            if (!md.isStatic()) {
                LOG.debug("Ignored non-static method %s", md);
                return pair;
            }

            if (!md.isPublic()) {
                LOG.debug("Ignored non-public method %s", md);
                return pair;
            }

            if (md.getReturnType().equals(TypeDescription.Generic.VOID)) {
                LOG.debug("Ignored return void method %s", md);
                return pair;
            }

            final Option<P2<Exports, Transforms>> exportsMayChanged = export.f(md, pair._1()).map(e -> P.p(e, pair._2())).toOption();
            final Option<P2<Exports, Transforms>> transformsMayChanged = transform.f(md, pair._2()).map(t -> P.p(pair._1(), t)).toOption();

            return exportsMayChanged.orElse(transformsMayChanged).orSome(() -> {
                LOG.debug("Ignored invalid annotated method %s", md);
                return pair;
            });
        };

    }

    private  Main();

}