private static Annotation stubForAnnotation(Class<?> clientType) {
        try {
            @SuppressWarnings("unchecked")
            final Class<Annotation> annotationClass = (Class<Annotation>) Class.forName(
                    BindableService.class.getPackage().getName() + ".kotlin.StubFor");
            final Annotation annotation = clientType.getAnnotation(annotationClass);
            if (annotation == null) {
                throw new IllegalArgumentException(
                        "Could not find StubFor annotation on a gRPC Kotlin client stub.");
            }
            return annotation;
        } catch (ClassNotFoundException e) {
            throw new IllegalArgumentException(
                    "Could not find StubFor annotation on a gRPC Kotlin client stub.", e);
        }
    }
A gRPC client stub factory for <a href="https://github.com/grpc/grpc-kotlin">gRPC-Kotlin</a>.
grpc/src/main/java/com/linecorp/armeria/internal/client/grpc/KotlinGrpcClientStubFactory.java