Package org.jfuncmachine.compiler.model
Class MethodPtrs
java.lang.Object
org.jfuncmachine.compiler.model.MethodPtrs
Utilities for creating pointers/references to methods, including constructors and interface methods
-
Method Summary
Modifier and TypeMethodDescriptionstatic ExpressionmakeJavaConstructorPtr(String className, Type[] parameterTypes) Create a pointer to a Java constructorstatic ExpressionmakeJavaConstructorPtr(String className, Type[] parameterTypes, String filename, int lineNumber) Create a pointer to a Java constructorstatic ExpressionmakeJavaInterfaceMethodPtr(String interfaceName, String methodName, Type[] parameterTypes, Type returnType) Create a pointer to a Java interface method that also requires the target object to be passed instatic ExpressionmakeJavaInterfaceMethodPtr(String interfaceName, String methodName, Type[] parameterTypes, Type returnType, String filename, int lineNumber) Create a pointer to a Java interface method that also requires the target object to be passed instatic ExpressionmakeJavaInterfaceMethodPtr(String interfaceName, String methodName, Type[] parameterTypes, Type returnType, Expression target) Create a pointer to a Java interface methodstatic ExpressionmakeJavaInterfaceMethodPtr(String interfaceName, String methodName, Type[] parameterTypes, Type returnType, Expression target, String filename, int lineNumber) Create a pointer to a Java interface methodstatic ExpressionmakeJavaMethodPtr(String className, String methodName, Type[] parameterTypes, Type returnType) Create a pointer to a Java methodstatic ExpressionmakeJavaMethodPtr(String className, String methodName, Type[] parameterTypes, Type returnType, String filename, int lineNumber) Create a pointer to a Java methodstatic ExpressionmakeJavaMethodPtr(String className, String methodName, Type[] parameterTypes, Type returnType, Expression target) Create a pointer to a Java methodstatic ExpressionmakeJavaMethodPtr(String className, String methodName, Type[] parameterTypes, Type returnType, Expression target, String filename, int lineNumber) Create a pointer to a Java methodstatic ExpressionmakeJavaStaticMethodPtr(String className, String methodName, Type[] parameterTypes, Type returnType) Create a pointer to a static Java methodstatic ExpressionmakeJavaStaticMethodPtr(String className, String methodName, Type[] parameterTypes, Type returnType, String filename, int lineNumber) Create a pointer to a static Java methodstatic ExpressionmakeMethodPtr(String className, String methodName, Type[] parameterTypes, Type returnType) Create a pointer to a method that may or may not do tail call optimization and requires the object to be passed in when invokedstatic ExpressionmakeMethodPtr(String className, String methodName, Type[] parameterTypes, Type returnType, String filename, int lineNumber) Create a pointer to a method that may or may not do tail call optimization and requires the object to be passed in when invokedstatic ExpressionmakeMethodPtr(String className, String methodName, Type[] parameterTypes, Type returnType, Expression target) Create a pointer to a method that may or may not do tail call optimizationstatic ExpressionmakeMethodPtr(String className, String methodName, Type[] parameterTypes, Type returnType, Expression target, String filename, int lineNumber) Create a pointer to a method that may or may not do tail call optimizationstatic ExpressionmakeStaticMethodPtr(String className, String methodName, Type[] parameterTypes, Type returnType) Create a pointer to a static method that may or may not do tail call optimizationstatic ExpressionmakeStaticMethodPtr(String className, String methodName, Type[] parameterTypes, Type returnType, String filename, int lineNumber) Create a pointer to a static method that may or may not do tail call optimizationstatic ExpressionmakeTailCallMethodPtr(String className, String methodName, Type[] parameterTypes, Type returnType) Create a pointer to a method that uses tail call optimizationstatic ExpressionmakeTailCallMethodPtr(String className, String methodName, Type[] parameterTypes, Type returnType, String filename, int lineNumber) Create a pointer to a method that uses tail call optimizationstatic ExpressionmakeTailCallMethodPtr(String className, String methodName, Type[] parameterTypes, Type returnType, Expression target) Create a pointer to a method that uses tail call optimizationstatic ExpressionmakeTailCallMethodPtr(String className, String methodName, Type[] parameterTypes, Type returnType, Expression target, String filename, int lineNumber) Create a pointer to a method that uses tail call optimizationstatic ExpressionmakeTailCallStaticMethodPtr(String className, String methodName, Type[] parameterTypes, Type returnType) Create a pointer to a static method that uses tail call optimizationstatic ExpressionmakeTailCallStaticMethodPtr(String className, String methodName, Type[] parameterTypes, Type returnType, String filename, int lineNumber) Create a pointer to a static method that uses tail call optimization
-
Method Details
-
makeJavaConstructorPtr
Create a pointer to a Java constructor- Parameters:
className- The name of the class to createparameterTypes- The constructor parameters- Returns:
- A lambda that invokes the constructor
-
makeJavaConstructorPtr
public static Expression makeJavaConstructorPtr(String className, Type[] parameterTypes, String filename, int lineNumber) Create a pointer to a Java constructor- Parameters:
className- The name of the class to createparameterTypes- The constructor parametersfilename- The source file where this pointer is createdlineNumber- The line number in the source file where this pointer is created- Returns:
- A lambda that invokes the constructor
-
makeJavaInterfaceMethodPtr
public static Expression makeJavaInterfaceMethodPtr(String interfaceName, String methodName, Type[] parameterTypes, Type returnType, Expression target) Create a pointer to 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 on- Returns:
- A lambda that invokes the interface method
-
makeJavaInterfaceMethodPtr
public static Expression makeJavaInterfaceMethodPtr(String interfaceName, String methodName, Type[] parameterTypes, Type returnType) Create a pointer to a Java interface method that also requires the target object to be passed in- 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 type- Returns:
- A lambda that invokes the interface method
-
makeJavaInterfaceMethodPtr
public static Expression makeJavaInterfaceMethodPtr(String interfaceName, String methodName, Type[] parameterTypes, Type returnType, Expression target, String filename, int lineNumber) Create a pointer to 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 onfilename- The source file where this pointer is createdlineNumber- The line number in the source file where this pointer is created- Returns:
- A lambda that invokes the interface method
-
makeJavaInterfaceMethodPtr
public static Expression makeJavaInterfaceMethodPtr(String interfaceName, String methodName, Type[] parameterTypes, Type returnType, String filename, int lineNumber) Create a pointer to a Java interface method that also requires the target object to be passed in- 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 typefilename- The source file where this pointer is createdlineNumber- The line number in the source file where this pointer is created- Returns:
- A lambda that invokes the interface method
-
makeJavaMethodPtr
public static Expression makeJavaMethodPtr(String className, String methodName, Type[] parameterTypes, Type returnType, Expression target) Create a pointer to 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 on- Returns:
- A lambda that invokes the interface method
-
makeJavaMethodPtr
public static Expression makeJavaMethodPtr(String className, String methodName, Type[] parameterTypes, Type returnType, Expression target, String filename, int lineNumber) Create a pointer to 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 onfilename- The source file where this pointer is createdlineNumber- The line number in the source file where this pointer is created- Returns:
- A lambda that invokes the interface method
-
makeJavaMethodPtr
public static Expression makeJavaMethodPtr(String className, String methodName, Type[] parameterTypes, Type returnType) Create a pointer to 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 type- Returns:
- A lambda that invokes the interface method
-
makeJavaMethodPtr
public static Expression makeJavaMethodPtr(String className, String methodName, Type[] parameterTypes, Type returnType, String filename, int lineNumber) Create a pointer to 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 typefilename- The source file where this pointer is createdlineNumber- The line number in the source file where this pointer is created- Returns:
- A lambda that invokes the interface method
-
makeJavaStaticMethodPtr
public static Expression makeJavaStaticMethodPtr(String className, String methodName, Type[] parameterTypes, Type returnType) Create a pointer to 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 type- Returns:
- A lambda that invokes the interface method
-
makeJavaStaticMethodPtr
public static Expression makeJavaStaticMethodPtr(String className, String methodName, Type[] parameterTypes, Type returnType, String filename, int lineNumber) Create a pointer to 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 typefilename- The source file where this pointer is createdlineNumber- The line number in the source file where this pointer is created- Returns:
- A lambda that invokes the interface method
-
makeMethodPtr
public static Expression makeMethodPtr(String className, String methodName, Type[] parameterTypes, Type returnType, Expression target) Create a pointer to 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 on- Returns:
- A lambda that invokes the interface method
-
makeMethodPtr
public static Expression makeMethodPtr(String className, String methodName, Type[] parameterTypes, Type returnType, Expression target, String filename, int lineNumber) Create a pointer to 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 onfilename- The source file where this pointer is createdlineNumber- The line number in the source file where this pointer is created- Returns:
- A lambda that invokes the interface method
-
makeMethodPtr
public static Expression makeMethodPtr(String className, String methodName, Type[] parameterTypes, Type returnType) Create a pointer to a method that may or may not do tail call optimization and requires the object to be passed in when invoked- 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 type- Returns:
- A lambda that invokes the interface method
-
makeMethodPtr
public static Expression makeMethodPtr(String className, String methodName, Type[] parameterTypes, Type returnType, String filename, int lineNumber) Create a pointer to a method that may or may not do tail call optimization and requires the object to be passed in when invoked- 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 typefilename- The source file where this pointer is createdlineNumber- The line number in the source file where this pointer is created- Returns:
- A lambda that invokes the interface method
-
makeStaticMethodPtr
public static Expression makeStaticMethodPtr(String className, String methodName, Type[] parameterTypes, Type returnType) Create a pointer to 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 type- Returns:
- A lambda that invokes the interface method
-
makeStaticMethodPtr
public static Expression makeStaticMethodPtr(String className, String methodName, Type[] parameterTypes, Type returnType, String filename, int lineNumber) Create a pointer to 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 typefilename- The source file where this pointer is createdlineNumber- The line number in the source file where this pointer is created- Returns:
- A lambda that invokes the interface method
-
makeTailCallMethodPtr
public static Expression makeTailCallMethodPtr(String className, String methodName, Type[] parameterTypes, Type returnType, Expression target) Create a pointer to 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 on- Returns:
- A lambda that invokes the interface method
-
makeTailCallMethodPtr
public static Expression makeTailCallMethodPtr(String className, String methodName, Type[] parameterTypes, Type returnType, Expression target, String filename, int lineNumber) Create a pointer to 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 onfilename- The source file where this pointer is createdlineNumber- The line number in the source file where this pointer is created- Returns:
- A lambda that invokes the interface method
-
makeTailCallMethodPtr
public static Expression makeTailCallMethodPtr(String className, String methodName, Type[] parameterTypes, Type returnType) Create a pointer to 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 type- Returns:
- A lambda that invokes the interface method
-
makeTailCallMethodPtr
public static Expression makeTailCallMethodPtr(String className, String methodName, Type[] parameterTypes, Type returnType, String filename, int lineNumber) Create a pointer to 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 typefilename- The source file where this pointer is createdlineNumber- The line number in the source file where this pointer is created- Returns:
- A lambda that invokes the interface method
-
makeTailCallStaticMethodPtr
public static Expression makeTailCallStaticMethodPtr(String className, String methodName, Type[] parameterTypes, Type returnType) Create a pointer to 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 type- Returns:
- A lambda that invokes the interface method
-
makeTailCallStaticMethodPtr
public static Expression makeTailCallStaticMethodPtr(String className, String methodName, Type[] parameterTypes, Type returnType, String filename, int lineNumber) Create a pointer to 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 typefilename- The source file where this pointer is createdlineNumber- The line number in the source file where this pointer is created- Returns:
- A lambda that invokes the interface method
-