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

org.snapscript.platform.android.ProxyInvocationBuilder Maven / Gradle / Ivy

There is a newer version: 1.4.6
Show newest version
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);
   }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy