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

org.snapscript.tree.define.AnyInvocationGenerator Maven / Gradle / Ivy

There is a newer version: 1.4.6
Show newest version
package org.snapscript.tree.define;

import java.lang.reflect.Constructor;

import org.snapscript.core.function.Invocation;

public class AnyInvocationGenerator {

   public AnyInvocationGenerator() {
      super();
   }

   public Invocation create(Class invoke) throws Exception {
      Constructor constructor = invoke.getDeclaredConstructor();
      
      if(!constructor.isAccessible()) {
         constructor.setAccessible(true);
      }
      return (Invocation)constructor.newInstance();
   }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy