Class ParameterizedOf<T>

  • Type Parameters:
    T - The type parameter of the parameterized type.
    All Implemented Interfaces:
    java.lang.reflect.ParameterizedType, java.lang.reflect.Type
    Direct Known Subclasses:
    ListOf, MapOf, NullableDocumentOf, OptionalOf, PageOf

    public class ParameterizedOf<T>
    extends java.lang.Object
    implements java.lang.reflect.ParameterizedType
    A utility class that implements ParameterizedType to represent a type with specified type arguments at runtime.
    • Constructor Summary

      Constructors 
      Constructor Description
      ParameterizedOf​(java.lang.reflect.Type rawType, java.lang.reflect.Type[] typeArguments)
      Constructs a new ParameterizedOf instance.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      java.lang.reflect.Type[] getActualTypeArguments()
      Returns the type arguments for this parameterized type.
      java.lang.reflect.Type getOwnerType()
      Returns the owner type of this parameterized type.
      java.lang.reflect.Type getRawType()
      Returns the raw type of this parameterized type.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
      • Methods inherited from interface java.lang.reflect.Type

        getTypeName
    • Constructor Detail

      • ParameterizedOf

        public ParameterizedOf​(java.lang.reflect.Type rawType,
                               java.lang.reflect.Type[] typeArguments)
        Constructs a new ParameterizedOf instance.
        Parameters:
        rawType - The raw type (e.g., List.class for List<String>).
        typeArguments - The type arguments (e.g., String.class for List<String>).
    • Method Detail

      • getActualTypeArguments

        public java.lang.reflect.Type[] getActualTypeArguments()
        Returns the type arguments for this parameterized type.
        Specified by:
        getActualTypeArguments in interface java.lang.reflect.ParameterizedType
        Returns:
        An array of Type objects representing the actual type arguments.
      • getRawType

        public java.lang.reflect.Type getRawType()
        Returns the raw type of this parameterized type.
        Specified by:
        getRawType in interface java.lang.reflect.ParameterizedType
        Returns:
        The raw Type representing the parameterized type.
      • getOwnerType

        public java.lang.reflect.Type getOwnerType()
        Returns the owner type of this parameterized type.
        Specified by:
        getOwnerType in interface java.lang.reflect.ParameterizedType
        Returns:
        null as this implementation does not support owner types.