# Class FunctionCallingUtils

java.lang.Object
com.google.adk.tools.FunctionCallingUtils

public final class FunctionCallingUtils extends Object
Utility class for function calling.

- ## Method Summary

  Modifier and Type
  Method
  Description
  `static com.google.genai.types.FunctionDeclaration`
  `buildFunctionDeclaration(Method func, List<String> ignoreParams)`
  Builds a FunctionDeclaration from a Java Method, ignoring parameters with the given names.
  `static com.google.genai.types.Schema`
  `buildSchemaFromType(Type type)`
  Builds a Schema from a Java Type, creating a new context for the generation process.
  `static com.google.genai.types.Schema`
  `buildSchemaFromType(Type type, com.fasterxml.jackson.databind.ObjectMapper objectMapper)`
  Builds a Schema from a Java Type, creating a new context for the generation process.

  ### Methods inherited from class Object

  `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- ## Method Details

  - ### buildFunctionDeclaration

    public static com.google.genai.types.FunctionDeclaration buildFunctionDeclaration(Method func, List<String> ignoreParams)
    Builds a FunctionDeclaration from a Java Method, ignoring parameters with the given names.
    Parameters:
      `func` - The Java `Method` to convert into a FunctionDeclaration.
      `ignoreParams` - The names of parameters to ignore.
    Returns:
      The generated `FunctionDeclaration`.
    Throws:
      `IllegalArgumentException` - if a type is encountered that cannot be serialized by Jackson.

  - ### buildSchemaFromType

    public static com.google.genai.types.Schema buildSchemaFromType(Type type)
    Builds a Schema from a Java Type, creating a new context for the generation process.
    Parameters:
      `type` - The Java `Type` to convert into a Schema.
    Returns:
      The generated `Schema`.
    Throws:
      `IllegalArgumentException` - if a type is encountered that cannot be serialized by Jackson.

  - ### buildSchemaFromType

    public static com.google.genai.types.Schema buildSchemaFromType(Type type, com.fasterxml.jackson.databind.ObjectMapper objectMapper)
    Builds a Schema from a Java Type, creating a new context for the generation process.
    Parameters:
      `type` - The Java `Type` to convert into a Schema.
      `objectMapper` - The `ObjectMapper` to use for introspecting types.
    Returns:
      The generated `Schema`.
    Throws:
      `IllegalArgumentException` - if a type is encountered that cannot be serialized by Jackson.