Object LambdaToolkit

  • All Implemented Interfaces:

    
    public class LambdaToolkit
    
                        
    Author:

    Toutatis_Gc

    • Nested Class Summary

      Nested Classes 
      Modifier and Type Class Description
    • Constructor Summary

      Constructors 
      Constructor Description
    • Enum Constant Summary

      Enum Constants 
      Enum Constant Description
    • Method Summary

      Modifier and Type Method Description
      final static <T extends Any, R extends Any> SerializedLambda serialize(XFunc<?, ?> func) 将指定的函数对象转换为 SerializedLambda 对象,以便在序列化或其他操作中使用。
      final static String getFieldName(SerializedLambda serializedLambda) 从 SerializedLambda 对象中提取并返回字段名。
      final static <T extends Any, R extends Any> String getFieldName(XFunc<T, R> func) 将lambda表达式使用表达式转换为字符串字段
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

    • Method Detail

      • serialize

         final static <T extends Any, R extends Any> SerializedLambda serialize(XFunc<?, ?> func)

        将指定的函数对象转换为 SerializedLambda 对象,以便在序列化或其他操作中使用。

        Parameters:
        func - 一个实现了函数接口的函数对象,用于进行序列化
        Returns:

        返回一个 SerializedLambda 对象,表示序列化后的函数对象

      • getFieldName

         final static String getFieldName(SerializedLambda serializedLambda)

        从 SerializedLambda 对象中提取并返回字段名。

        Parameters:
        serializedLambda - 一个包含 Lambda 表达式信息的 SerializedLambda 对象
        Returns:

        返回从 Lambda 表达式中提取的字段名

      • getFieldName

         final static <T extends Any, R extends Any> String getFieldName(XFunc<T, R> func)

        将lambda表达式使用表达式转换为字符串字段

        Parameters:
        func - 需要转换的字段
        Returns:

        表达式字段