Class Types

java.lang.Object
dev.langchain4j.internal.Types

public final class Types extends Object
Builds Type instances for generic types, so that a caller can ask a Json.JsonCodec for a List<Foo> without a JSON library's type token.

TypeReference and its equivalents belong to a particular library and moved package in Jackson 3, which is exactly what the codec SPI exists to avoid depending on.

  • Method Details

    • listOf

      public static Type listOf(Type elementType)
      The type of a List<T>.
    • parameterized

      public static Type parameterized(Class<?> raw, Type... typeArguments)
      The type of raw<typeArguments...>, for example Map<String, Object>.