All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.fiolino.common.reflection.MethodVisitor Maven / Gradle / Ivy

Go to download

General structure to easily create dynamic logic via MethodHandles and others.

There is a newer version: 1.0.10
Show newest version
package org.fiolino.common.reflection;

import java.lang.invoke.MethodHandle;
import java.lang.reflect.Method;
import java.util.function.Supplier;

/**
 * Created by Kuli on 6/15/2016.
 */
public interface MethodVisitor {

    /**
     * Is called as a callback from a method visitor.
     *
     * @param value          The value from the previous run (or the initial value, if it's the first run)
     * @param m              The visited method
     * @param handleSupplier Will return the MethodHandle of that method, or the created handle by that
     * @return The value for the next run, or the return value in case of the last run
     */
    V visit(V value, Method m, Supplier handleSupplier);
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy