Class FunctionInfo

java.lang.Object
uno.anahata.ai.tools.FunctionInfo

public class FunctionInfo extends Object
A metadata class that links a Gemini FunctionDeclaration to its underlying Java Method implementation.

This is used internally by the ToolManager to manage the registry of available tools and to perform the actual method invocation.

Author:
anahata
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    final com.google.genai.types.FunctionDeclaration
    The Gemini API function declaration, including name, description, and schema.
    final Method
    The Java method that implements the tool's logic.
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    long
    Calculates the approximate size of the function declaration in characters when serialized to JSON.

    Methods inherited from class Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

    • declaration

      public final com.google.genai.types.FunctionDeclaration declaration
      The Gemini API function declaration, including name, description, and schema.
    • method

      public final Method method
      The Java method that implements the tool's logic.
  • Constructor Details

    • FunctionInfo

      public FunctionInfo()
  • Method Details

    • getSize

      public long getSize()
      Calculates the approximate size of the function declaration in characters when serialized to JSON.
      Returns:
      The character length of the JSON representation.