Class PartialCalls

java.lang.Object
org.jfuncmachine.compiler.model.PartialCalls

public class PartialCalls extends Object
Utilities for creating pointers/references to methods, including constructors and interface methods
  • Method Details

    • makePartialJavaConstructorCall

      public static Expression makePartialJavaConstructorCall(String className, Type[] parameterTypes, Expression[] arguments)
      Create a partial call of a Java constructor
      Parameters:
      className - The name of the class to create
      parameterTypes - The constructor parameters
      arguments - The partial arguments to the constructor
      Returns:
      A lambda that invokes the constructor
    • makePartialJavaConstructorCall

      public static Expression makePartialJavaConstructorCall(String className, Type[] parameterTypes, Expression[] arguments, String filename, int lineNumber)
      Create a partial call of a Java constructor
      Parameters:
      className - The name of the class to create
      parameterTypes - The constructor parameters
      arguments - The partial arguments to the constructor
      filename - The source file where this call is created
      lineNumber - The line number in the source file where this call is created
      Returns:
      A lambda that invokes the constructor
    • makePartialJavaInterfaceMethodCall

      public static Expression makePartialJavaInterfaceMethodCall(String interfaceName, String methodName, Type[] parameterTypes, Type returnType, Expression target, Expression[] arguments)
      Create a partial call of a Java interface method
      Parameters:
      interfaceName - The name of the Java interface containing the method
      methodName - The name of the method to point to
      parameterTypes - The types of the method parameters
      returnType - The method return type
      target - The object this method should be invoked on
      arguments - The partial arguments to the method
      Returns:
      A lambda that invokes the interface method
    • makePartialJavaInterfaceMethodCall

      public static Expression makePartialJavaInterfaceMethodCall(String interfaceName, String methodName, Type[] parameterTypes, Type returnType, Expression target, Expression[] arguments, String filename, int lineNumber)
      Create a partial call of a Java interface method
      Parameters:
      interfaceName - The name of the Java interface containing the method
      methodName - The name of the method to point to
      parameterTypes - The types of the method parameters
      returnType - The method return type
      target - The object this method should be invoked on
      arguments - The partial arguments to the method
      filename - The source file where this call is created
      lineNumber - The line number in the source file where this call is created
      Returns:
      A lambda that invokes the interface method
    • makePartialJavaInterfaceMethodCall

      public static Expression makePartialJavaInterfaceMethodCall(String interfaceName, String methodName, Type[] parameterTypes, Type returnType, Expression[] arguments)
      Create a partial call of a Java interface method that requires the target object to be passed in as the first parameter
      Parameters:
      interfaceName - The name of the Java interface containing the method
      methodName - The name of the method to point to
      parameterTypes - The types of the method parameters
      returnType - The method return type
      arguments - The partial arguments to the method
      Returns:
      A lambda that invokes the interface method
    • makePartialJavaInterfaceMethodCall

      public static Expression makePartialJavaInterfaceMethodCall(String interfaceName, String methodName, Type[] parameterTypes, Type returnType, Expression[] arguments, String filename, int lineNumber)
      Create a partial call of a Java interface method
      Parameters:
      interfaceName - The name of the Java interface containing the method
      methodName - The name of the method to point to
      parameterTypes - The types of the method parameters
      returnType - The method return type
      arguments - The partial arguments to the method
      filename - The source file where this call is created
      lineNumber - The line number in the source file where this call is created
      Returns:
      A lambda that invokes the interface method
    • makePartialJavaMethodCall

      public static Expression makePartialJavaMethodCall(String className, String methodName, Type[] parameterTypes, Type returnType, Expression target, Expression[] arguments)
      Create a partial call of a Java method
      Parameters:
      className - The name of the Java class containing the method
      methodName - The name of the method to point to
      parameterTypes - The types of the method parameters
      returnType - The method return type
      target - The object this method should be invoked on
      arguments - The partial arguments to the method
      Returns:
      A lambda that invokes the interface method
    • makePartialJavaMethodCall

      public static Expression makePartialJavaMethodCall(String className, String methodName, Type[] parameterTypes, Type returnType, Expression target, Expression[] arguments, String filename, int lineNumber)
      Create a partial call of a Java method
      Parameters:
      className - The name of the Java class containing the method
      methodName - The name of the method to point to
      parameterTypes - The types of the method parameters
      returnType - The method return type
      target - The object this method should be invoked on
      arguments - The partial arguments to the method
      filename - The source file where this call is created
      lineNumber - The line number in the source file where this call is created
      Returns:
      A lambda that invokes the interface method
    • makePartialJavaMethodCall

      public static Expression makePartialJavaMethodCall(String className, String methodName, Type[] parameterTypes, Type returnType, Expression[] arguments)
      Create a partial call of a Java method that requires the object to be passed as the first argument
      Parameters:
      className - The name of the Java class containing the method
      methodName - The name of the method to point to
      parameterTypes - The types of the method parameters
      returnType - The method return type
      arguments - The partial arguments to the method
      Returns:
      A lambda that invokes the interface method
    • makePartialJavaMethodCall

      public static Expression makePartialJavaMethodCall(String className, String methodName, Type[] parameterTypes, Type returnType, Expression[] arguments, String filename, int lineNumber)
      Create a partial call of a Java method that requires the object to be passed as the first argument
      Parameters:
      className - The name of the Java class containing the method
      methodName - The name of the method to point to
      parameterTypes - The types of the method parameters
      returnType - The method return type
      arguments - The partial arguments to the method
      filename - The source file where this call is created
      lineNumber - The line number in the source file where this call is created
      Returns:
      A lambda that invokes the interface method
    • makePartialJavaStaticMethodCall

      public static Expression makePartialJavaStaticMethodCall(String className, String methodName, Type[] parameterTypes, Type returnType, Expression[] arguments)
      Create a partial call of a static Java method
      Parameters:
      className - The name of the Java class containing the method
      methodName - The name of the method to point to
      parameterTypes - The types of the method parameters
      returnType - The method return type
      arguments - The partial arguments to the method
      Returns:
      A lambda that invokes the interface method
    • makePartialJavaStaticMethodCall

      public static Expression makePartialJavaStaticMethodCall(String className, String methodName, Type[] parameterTypes, Type returnType, Expression[] arguments, String filename, int lineNumber)
      Create a partial call of a static Java method
      Parameters:
      className - The name of the Java class containing the method
      methodName - The name of the method to point to
      parameterTypes - The types of the method parameters
      returnType - The method return type
      arguments - The partial arguments to the method
      filename - The source file where this call is created
      lineNumber - The line number in the source file where this call is created
      Returns:
      A lambda that invokes the interface method
    • makePartialMethodCall

      public static Expression makePartialMethodCall(String className, String methodName, Type[] parameterTypes, Type returnType, Expression target, Expression[] arguments)
      Create a partial call of a method that may or may not do tail call optimization
      Parameters:
      className - The name of the class containing the method
      methodName - The name of the method to point to
      parameterTypes - The types of the method parameters
      returnType - The method return type
      target - The object this method should be invoked on
      arguments - The partial arguments to the method
      Returns:
      A lambda that invokes the interface method
    • makePartialMethodCall

      public static Expression makePartialMethodCall(String className, String methodName, Type[] parameterTypes, Type returnType, Expression target, Expression[] arguments, String filename, int lineNumber)
      Create a partial call of a method that may or may not do tail call optimization
      Parameters:
      className - The name of the class containing the method
      methodName - The name of the method to point to
      parameterTypes - The types of the method parameters
      returnType - The method return type
      target - The object this method should be invoked on
      arguments - The partial arguments to the method
      filename - The source file where this call is created
      lineNumber - The line number in the source file where this call is created
      Returns:
      A lambda that invokes the interface method
    • makePartialMethodCall

      public static Expression makePartialMethodCall(String className, String methodName, Type[] parameterTypes, Type returnType, Expression[] arguments)
      Create a partial call of a method that may or may not do tail call optimization
      Parameters:
      className - The name of the class containing the method
      methodName - The name of the method to point to
      parameterTypes - The types of the method parameters
      returnType - The method return type
      arguments - The partial arguments to the method
      Returns:
      A lambda that invokes the interface method
    • makePartialMethodCall

      public static Expression makePartialMethodCall(String className, String methodName, Type[] parameterTypes, Type returnType, Expression[] arguments, String filename, int lineNumber)
      Create a partial call of a method that may or may not do tail call optimization
      Parameters:
      className - The name of the class containing the method
      methodName - The name of the method to point to
      parameterTypes - The types of the method parameters
      returnType - The method return type
      arguments - The partial arguments to the method
      filename - The source file where this call is created
      lineNumber - The line number in the source file where this call is created
      Returns:
      A lambda that invokes the interface method
    • makePartialStaticMethodCall

      public static Expression makePartialStaticMethodCall(String className, String methodName, Type[] parameterTypes, Type returnType, Expression[] arguments)
      Create a partial call of a static method that may or may not do tail call optimization
      Parameters:
      className - The name of the class containing the method
      methodName - The name of the method to point to
      parameterTypes - The types of the method parameters
      returnType - The method return type
      arguments - The partial arguments to the method
      Returns:
      A lambda that invokes the interface method
    • makePartialStaticMethodCall

      public static Expression makePartialStaticMethodCall(String className, String methodName, Type[] parameterTypes, Type returnType, Expression[] arguments, String filename, int lineNumber)
      Create a partial call of a static method that may or may not do tail call optimization
      Parameters:
      className - The name of the class containing the method
      methodName - The name of the method to point to
      parameterTypes - The types of the method parameters
      returnType - The method return type
      arguments - The partial arguments to the method
      filename - The source file where this call is created
      lineNumber - The line number in the source file where this call is created
      Returns:
      A lambda that invokes the interface method
    • makePartialTailCallMethodCall

      public static Expression makePartialTailCallMethodCall(String className, String methodName, Type[] parameterTypes, Type returnType, Expression target, Expression[] arguments)
      Create a partial call of a method that uses tail call optimization
      Parameters:
      className - The name of the class containing the method
      methodName - The name of the method to point to
      parameterTypes - The types of the method parameters
      returnType - The method return type
      target - The object this method should be invoked on
      arguments - The partial arguments to the method
      Returns:
      A lambda that invokes the interface method
    • makePartialTailCallMethodCall

      public static Expression makePartialTailCallMethodCall(String className, String methodName, Type[] parameterTypes, Type returnType, Expression target, Expression[] arguments, String filename, int lineNumber)
      Create a partial call of a method that uses tail call optimization
      Parameters:
      className - The name of the class containing the method
      methodName - The name of the method to point to
      parameterTypes - The types of the method parameters
      returnType - The method return type
      target - The object this method should be invoked on
      arguments - The partial arguments to the method
      filename - The source file where this call is created
      lineNumber - The line number in the source file where this call is created
      Returns:
      A lambda that invokes the interface method
    • makePartialTailCallMethodCall

      public static Expression makePartialTailCallMethodCall(String className, String methodName, Type[] parameterTypes, Type returnType, Expression[] arguments)
      Create a partial call of a method that uses tail call optimization that requires the object to be passed in as the first parameter
      Parameters:
      className - The name of the class containing the method
      methodName - The name of the method to point to
      parameterTypes - The types of the method parameters
      returnType - The method return type
      arguments - The partial arguments to the method
      Returns:
      A lambda that invokes the interface method
    • makePartialTailCallMethodCall

      public static Expression makePartialTailCallMethodCall(String className, String methodName, Type[] parameterTypes, Type returnType, Expression[] arguments, String filename, int lineNumber)
      Create a partial call of a method that uses tail call optimization
      Parameters:
      className - The name of the class containing the method
      methodName - The name of the method to point to
      parameterTypes - The types of the method parameters
      returnType - The method return type
      arguments - The partial arguments to the method
      filename - The source file where this call is created
      lineNumber - The line number in the source file where this call is created
      Returns:
      A lambda that invokes the interface method
    • makePartialTailCallStaticMethodCall

      public static Expression makePartialTailCallStaticMethodCall(String className, String methodName, Type[] parameterTypes, Type returnType, Expression[] arguments)
      Create a partial call of a static method that uses tail call optimization
      Parameters:
      className - The name of the class containing the method
      methodName - The name of the method to point to
      parameterTypes - The types of the method parameters
      returnType - The method return type
      arguments - The partial arguments to the method
      Returns:
      A lambda that invokes the interface method
    • makePartialTailCallStaticMethodCall

      public static Expression makePartialTailCallStaticMethodCall(String className, String methodName, Type[] parameterTypes, Type returnType, Expression[] arguments, String filename, int lineNumber)
      Create a partial call of a static method that uses tail call optimization
      Parameters:
      className - The name of the class containing the method
      methodName - The name of the method to point to
      parameterTypes - The types of the method parameters
      returnType - The method return type
      arguments - The partial arguments to the method
      filename - The source file where this call is created
      lineNumber - The line number in the source file where this call is created
      Returns:
      A lambda that invokes the interface method
    • makePartialInvoke

      public static Expression makePartialInvoke(FunctionType funcType, Expression target, Expression[] arguments)
      Create a partial call of a Java interface method
      Parameters:
      funcType - The type of the function pointer to invoke
      target - The function pointer to invoke
      arguments - The partial arguments to the method
      Returns:
      A lambda that invokes the interface method
    • makePartialInvoke

      public static Expression makePartialInvoke(FunctionType funcType, Expression target, Expression[] arguments, String filename, int lineNumber)
      Create a partial call of a Java interface method
      Parameters:
      funcType - The type of the function pointer to invoke
      target - The function pointer to invoke
      arguments - The partial arguments to the method
      filename - The source file where this call is created
      lineNumber - The line number in the source file where this call is created
      Returns:
      A lambda that invokes the interface method
    • makePartialInvokeWithoutObject

      public static Expression makePartialInvokeWithoutObject(FunctionType funcType, Expression target, Expression[] arguments)
      Create a partial call of a Java interface method that requires the target method object to be passed in as the first parameter. This requires that the function pointer being invoked requires the object as the first parameter.
      Parameters:
      funcType - The type of the function pointer to invoke
      target - The function pointer to invoke
      arguments - The partial arguments to the method
      Returns:
      A lambda that invokes the interface method
    • makePartialInvokeWithoutObject

      public static Expression makePartialInvokeWithoutObject(FunctionType funcType, Expression target, Expression[] arguments, String filename, int lineNumber)
      Create a partial call of a Java interface method that requires the target method object to be passed in as the first parameter. This requires that the function pointer being invoked requires the object as the first parameter.
      Parameters:
      funcType - The type of the function pointer to invoke
      target - The function pointer to invoke
      arguments - The partial arguments to the method
      filename - The source file where this call is created
      lineNumber - The line number in the source file where this call is created
      Returns:
      A lambda that invokes the interface method