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

fun.langel.cql.bind.CaveProxyFactory Maven / Gradle / Ivy

The newest version!
package fun.langel.cql.bind;

import fun.langel.cql.spring.Configuration;

import java.lang.reflect.Method;
import java.lang.reflect.Proxy;
import java.util.HashMap;
import java.util.Map;

/**
 * @author [email protected](GuHan)
 * @since 2021/10/19 9:22 下午
 **/
public class CaveProxyFactory {

    private Class klass;

    private Configuration configuration;
    private final Map methodCache = new HashMap<>();

    public CaveProxyFactory(final Configuration configuration,
                            final Class klass) {
        this.configuration = configuration;
        this.klass = klass;
    }

    public T newInstance() {
        return (T) Proxy.newProxyInstance(this.klass.getClassLoader(), new Class[]{klass}, new CaveProxy(this.configuration, this.klass, methodCache));
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy