Record Class BuiltinFunctionInfo

java.lang.Object
java.lang.Record
org.daiitech.naftah.builtin.lang.BuiltinFunctionInfo
Record Components:
methodName - the Java method name implementing the function
className - fully qualified name of the declaring class
methodParameterTypes - fully qualified parameter type names used to resolve the method via reflection
canonicalKey - the primary lookup key used in function indexing (normalized name)
qualifiedAliases - alternative lookup keys (possibly qualified or namespaced aliases)

public record BuiltinFunctionInfo(String methodName, String className, String[] methodParameterTypes, String canonicalKey, String[] qualifiedAliases) extends Record
Lightweight metadata descriptor for a built-in function.

This record represents the static, serializable information required to locate and resolve a built-in function at runtime without directly holding reflective Method references.

It is primarily used by the runtime index system to support:

  • fast lookup of built-in functions
  • deferred reflective resolution
  • alias-based function resolution

Author:
Chakib Daii
  • Field Details

    • methodName

      private final String methodName
      The field for the methodName record component.
    • className

      private final String className
      The field for the className record component.
    • methodParameterTypes

      private final String[] methodParameterTypes
      The field for the methodParameterTypes record component.
    • canonicalKey

      private final String canonicalKey
      The field for the canonicalKey record component.
    • qualifiedAliases

      private final String[] qualifiedAliases
      The field for the qualifiedAliases record component.
  • Constructor Details

    • BuiltinFunctionInfo

      public BuiltinFunctionInfo(String methodName, String className, String[] methodParameterTypes, String canonicalKey, String[] qualifiedAliases)
      Creates an instance of a BuiltinFunctionInfo record class.
      Parameters:
      methodName - the value for the methodName record component
      className - the value for the className record component
      methodParameterTypes - the value for the methodParameterTypes record component
      canonicalKey - the value for the canonicalKey record component
      qualifiedAliases - the value for the qualifiedAliases record component
  • Method Details

    • toString

      public String toString()
      Returns a simplified human-readable representation of this function descriptor.

      Format: className#methodName

      This is primarily intended for debugging and logging and does not uniquely identify overloaded methods.

      Specified by:
      toString in class Record
      Returns:
      a string in the form className#methodName
    • hashCode

      public final int hashCode()
      Returns a hash code value for this object. The value is derived from the hash code of each of the record components.
      Specified by:
      hashCode in class Record
      Returns:
      a hash code value for this object
    • equals

      public final boolean equals(Object o)
      Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. All components in this record class are compared with Objects::equals(Object,Object).
      Specified by:
      equals in class Record
      Parameters:
      o - the object with which to compare
      Returns:
      true if this object is the same as the o argument; false otherwise.
    • methodName

      public String methodName()
      Returns the value of the methodName record component.
      Returns:
      the value of the methodName record component
    • className

      public String className()
      Returns the value of the className record component.
      Returns:
      the value of the className record component
    • methodParameterTypes

      public String[] methodParameterTypes()
      Returns the value of the methodParameterTypes record component.
      Returns:
      the value of the methodParameterTypes record component
    • canonicalKey

      public String canonicalKey()
      Returns the value of the canonicalKey record component.
      Returns:
      the value of the canonicalKey record component
    • qualifiedAliases

      public String[] qualifiedAliases()
      Returns the value of the qualifiedAliases record component.
      Returns:
      the value of the qualifiedAliases record component