Esempio n. 1
0
 /**
  * Instantiate the Factory
  *
  * @param args arguments to pass to the create method
  * @return a new BuiltinFunction that closes over the arguments
  */
 public BuiltinFunction apply(Object... args) {
   try {
     return (BuiltinFunction) createMethod.invoke(this, args);
   } catch (InvocationTargetException | IllegalArgumentException | IllegalAccessException e) {
     throw new RuntimeException(
         String.format(
             "Exception while applying BuiltinFunction.Factory %s: %s", this, e.getMessage()),
         e);
   }
 }