Package org.jfuncmachine.compiler.model
Class PartialCalls
java.lang.Object
org.jfuncmachine.compiler.model.PartialCalls
Utilities for creating pointers/references to methods, including constructors and interface methods
-
Method Summary
Modifier and TypeMethodDescriptionstatic ExpressionmakePartialInvoke(FunctionType funcType, Expression target, Expression[] arguments) Create a partial call of a Java interface methodstatic ExpressionmakePartialInvoke(FunctionType funcType, Expression target, Expression[] arguments, String filename, int lineNumber) Create a partial call of a Java interface methodstatic ExpressionmakePartialInvokeWithoutObject(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.static ExpressionmakePartialInvokeWithoutObject(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.static ExpressionmakePartialJavaConstructorCall(String className, Type[] parameterTypes, Expression[] arguments) Create a partial call of a Java constructorstatic ExpressionmakePartialJavaConstructorCall(String className, Type[] parameterTypes, Expression[] arguments, String filename, int lineNumber) Create a partial call of a Java constructorstatic ExpressionmakePartialJavaInterfaceMethodCall(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 parameterstatic ExpressionmakePartialJavaInterfaceMethodCall(String interfaceName, String methodName, Type[] parameterTypes, Type returnType, Expression[] arguments, String filename, int lineNumber) Create a partial call of a Java interface methodstatic ExpressionmakePartialJavaInterfaceMethodCall(String interfaceName, String methodName, Type[] parameterTypes, Type returnType, Expression target, Expression[] arguments) Create a partial call of a Java interface methodstatic ExpressionmakePartialJavaInterfaceMethodCall(String interfaceName, String methodName, Type[] parameterTypes, Type returnType, Expression target, Expression[] arguments, String filename, int lineNumber) Create a partial call of a Java interface methodstatic ExpressionmakePartialJavaMethodCall(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 argumentstatic ExpressionmakePartialJavaMethodCall(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 argumentstatic ExpressionmakePartialJavaMethodCall(String className, String methodName, Type[] parameterTypes, Type returnType, Expression target, Expression[] arguments) Create a partial call of a Java methodstatic ExpressionmakePartialJavaMethodCall(String className, String methodName, Type[] parameterTypes, Type returnType, Expression target, Expression[] arguments, String filename, int lineNumber) Create a partial call of a Java methodstatic ExpressionmakePartialJavaStaticMethodCall(String className, String methodName, Type[] parameterTypes, Type returnType, Expression[] arguments) Create a partial call of a static Java methodstatic ExpressionmakePartialJavaStaticMethodCall(String className, String methodName, Type[] parameterTypes, Type returnType, Expression[] arguments, String filename, int lineNumber) Create a partial call of a static Java methodstatic ExpressionmakePartialMethodCall(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 optimizationstatic ExpressionmakePartialMethodCall(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 optimizationstatic ExpressionmakePartialMethodCall(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 optimizationstatic ExpressionmakePartialMethodCall(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 optimizationstatic ExpressionmakePartialStaticMethodCall(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 optimizationstatic ExpressionmakePartialStaticMethodCall(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 optimizationstatic ExpressionmakePartialTailCallMethodCall(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 parameterstatic ExpressionmakePartialTailCallMethodCall(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 optimizationstatic ExpressionmakePartialTailCallMethodCall(String className, String methodName, Type[] parameterTypes, Type returnType, Expression target, Expression[] arguments) Create a partial call of a method that uses tail call optimizationstatic ExpressionmakePartialTailCallMethodCall(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 optimizationstatic ExpressionmakePartialTailCallStaticMethodCall(String className, String methodName, Type[] parameterTypes, Type returnType, Expression[] arguments) Create a partial call of a static method that uses tail call optimizationstatic ExpressionmakePartialTailCallStaticMethodCall(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
-
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 createparameterTypes- The constructor parametersarguments- 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 createparameterTypes- The constructor parametersarguments- The partial arguments to the constructorfilename- The source file where this call is createdlineNumber- 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 methodmethodName- The name of the method to point toparameterTypes- The types of the method parametersreturnType- The method return typetarget- The object this method should be invoked onarguments- 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 methodmethodName- The name of the method to point toparameterTypes- The types of the method parametersreturnType- The method return typetarget- The object this method should be invoked onarguments- The partial arguments to the methodfilename- The source file where this call is createdlineNumber- 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 methodmethodName- The name of the method to point toparameterTypes- The types of the method parametersreturnType- The method return typearguments- 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 methodmethodName- The name of the method to point toparameterTypes- The types of the method parametersreturnType- The method return typearguments- The partial arguments to the methodfilename- The source file where this call is createdlineNumber- 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 methodmethodName- The name of the method to point toparameterTypes- The types of the method parametersreturnType- The method return typetarget- The object this method should be invoked onarguments- 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 methodmethodName- The name of the method to point toparameterTypes- The types of the method parametersreturnType- The method return typetarget- The object this method should be invoked onarguments- The partial arguments to the methodfilename- The source file where this call is createdlineNumber- 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 methodmethodName- The name of the method to point toparameterTypes- The types of the method parametersreturnType- The method return typearguments- 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 methodmethodName- The name of the method to point toparameterTypes- The types of the method parametersreturnType- The method return typearguments- The partial arguments to the methodfilename- The source file where this call is createdlineNumber- 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 methodmethodName- The name of the method to point toparameterTypes- The types of the method parametersreturnType- The method return typearguments- 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 methodmethodName- The name of the method to point toparameterTypes- The types of the method parametersreturnType- The method return typearguments- The partial arguments to the methodfilename- The source file where this call is createdlineNumber- 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 methodmethodName- The name of the method to point toparameterTypes- The types of the method parametersreturnType- The method return typetarget- The object this method should be invoked onarguments- 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 methodmethodName- The name of the method to point toparameterTypes- The types of the method parametersreturnType- The method return typetarget- The object this method should be invoked onarguments- The partial arguments to the methodfilename- The source file where this call is createdlineNumber- 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 methodmethodName- The name of the method to point toparameterTypes- The types of the method parametersreturnType- The method return typearguments- 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 methodmethodName- The name of the method to point toparameterTypes- The types of the method parametersreturnType- The method return typearguments- The partial arguments to the methodfilename- The source file where this call is createdlineNumber- 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 methodmethodName- The name of the method to point toparameterTypes- The types of the method parametersreturnType- The method return typearguments- 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 methodmethodName- The name of the method to point toparameterTypes- The types of the method parametersreturnType- The method return typearguments- The partial arguments to the methodfilename- The source file where this call is createdlineNumber- 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 methodmethodName- The name of the method to point toparameterTypes- The types of the method parametersreturnType- The method return typetarget- The object this method should be invoked onarguments- 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 methodmethodName- The name of the method to point toparameterTypes- The types of the method parametersreturnType- The method return typetarget- The object this method should be invoked onarguments- The partial arguments to the methodfilename- The source file where this call is createdlineNumber- 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 methodmethodName- The name of the method to point toparameterTypes- The types of the method parametersreturnType- The method return typearguments- 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 methodmethodName- The name of the method to point toparameterTypes- The types of the method parametersreturnType- The method return typearguments- The partial arguments to the methodfilename- The source file where this call is createdlineNumber- 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 methodmethodName- The name of the method to point toparameterTypes- The types of the method parametersreturnType- The method return typearguments- 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 methodmethodName- The name of the method to point toparameterTypes- The types of the method parametersreturnType- The method return typearguments- The partial arguments to the methodfilename- The source file where this call is createdlineNumber- 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 invoketarget- The function pointer to invokearguments- 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 invoketarget- The function pointer to invokearguments- The partial arguments to the methodfilename- The source file where this call is createdlineNumber- 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 invoketarget- The function pointer to invokearguments- 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 invoketarget- The function pointer to invokearguments- The partial arguments to the methodfilename- The source file where this call is createdlineNumber- The line number in the source file where this call is created- Returns:
- A lambda that invokes the interface method
-