org.snapscript.platform.android.ProxyInvocationBuilder Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of snap-all Show documentation
Show all versions of snap-all Show documentation
Dynamic scripting for the JVM
package org.snapscript.platform.android;
import java.lang.reflect.Constructor;
import java.lang.reflect.Method;
import java.util.concurrent.Executor;
import org.snapscript.common.thread.ThreadPool;
import org.snapscript.core.function.Invocation;
public class ProxyInvocationBuilder {
private final ProxyAdapterBuilder generator;
private final Executor executor;
public ProxyInvocationBuilder(ProxyClassLoader generator) {
this.generator = new ProxyAdapterBuilder(generator);
this.executor = new ThreadPool(1);
}
public Invocation createSuperMethod(Method method) {
return new ProxyMethodSuperInvocation(method);
}
public Invocation createMethod(Method method) {
return new ProxyMethodInvocation(generator, method, executor);
}
public Invocation createConstructor(Constructor constructor) {
return new ProxyConstructorInvocation(generator, constructor, executor);
}
}