Package com.fauna.codec
Class ParameterizedOf<T>
- java.lang.Object
-
- com.fauna.codec.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 implementsParameterizedType
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 newParameterizedOf
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.
-
-
-
Constructor Detail
-
ParameterizedOf
public ParameterizedOf(java.lang.reflect.Type rawType, java.lang.reflect.Type[] typeArguments)
Constructs a newParameterizedOf
instance.- Parameters:
rawType
- The raw type (e.g.,List.class
forList<String>
).typeArguments
- The type arguments (e.g.,String.class
forList<String>
).
-
-
Method Detail
-
getActualTypeArguments
public java.lang.reflect.Type[] getActualTypeArguments()
Returns the type arguments for this parameterized type.- Specified by:
getActualTypeArguments
in interfacejava.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 interfacejava.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 interfacejava.lang.reflect.ParameterizedType
- Returns:
null
as this implementation does not support owner types.
-
-