iron-core/src/main/java/io/axway/iron/core/internal/utils/IntrospectionHelper.java
public static <T> Method retrieveMethod(Class<T> clazz, Accessor<T, ?> accessor) {
        MethodCallRecorder methodCallRecorder = new MethodCallRecorder();

        T accessorInstance = ProxyFactoryBuilder.<MethodCallRecorder>newProxyFactoryBuilder() //
                .defaultObjectMethods() //
                .unhandled((context, proxy, method, args) -> {
                    context.setMethod(method);
                    return DEFAULT_VALUES.get(method.getReturnType());
                }) //
                .build(clazz).createProxy(methodCallRecorder);

        accessor.get(accessorInstance);
        Method method = methodCallRecorder.getMethod();
        if (method == null) {
            throw new StoreException("Method reference didn't call any method on the class", args -> args.add("className", clazz.getName()));
        }
        return method;
    }
public static <T> Method retrieveMethod(Class<T> clazz, Accessor<T, ?> accessor) {
        MethodCallRecorder methodCallRecorder = new MethodCallRecorder();

        T accessorInstance = ProxyFactoryBuilder.<MethodCallRecorder>newProxyFactoryBuilder() //
                .defaultObjectMethods() //
                .unhandled((context, proxy, method, args) -> {
                    context.setMethod(method);
                    return DEFAULT_VALUES.get(method.getReturnType());
                }) //
                .build(clazz).createProxy(methodCallRecorder);

        accessor.get(accessorInstance);
        Method method = methodCallRecorder.getMethod();
        if (method == null) {
            throw new StoreException("Method reference didn't call any method on the class", args -> args.add("className", clazz.getName()));
        }
        return method;
    }
This method don't use cache. Use with care.<br>
If caching is required, then use {@link #getMethodName(Class, Accessor)}

@param clazz the class where the method is defined
@param accessor the method reference
@param <T> the type of the class
@return the referenced method