Interface PojoGenericTypeModel<T>
-
- Type Parameters:
T
- The type represented by this model
- All Superinterfaces:
PojoTypeModel<T>
- All Known Implementing Classes:
AbstractPojoGenericTypeModel
,GenericContextAwarePojoGenericTypeModel
,SyntheticPojoGenericTypeModel
public interface PojoGenericTypeModel<T> extends PojoTypeModel<T>
APojoTypeModel
representing a parameterized type, where generic type arguments are known.This type model offers additional reflection capabilities, such as the ability to retrieve the type argument for a given generic supertype.
- See Also:
the default implementation
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description Optional<? extends PojoGenericTypeModel<?>>
arrayElementType()
Optional<? extends PojoGenericTypeModel<?>>
typeArgument(Class<?> rawSuperType, int typeParameterIndex)
-
Methods inherited from interface org.hibernate.search.mapper.pojo.model.spi.PojoTypeModel
castTo, name, property, rawType
-
-
-
-
Method Detail
-
typeArgument
Optional<? extends PojoGenericTypeModel<?>> typeArgument(Class<?> rawSuperType, int typeParameterIndex)
- Parameters:
rawSuperType
- The supertype to resolve type parameters fortypeParameterIndex
- The index of the type parameter to resolve- Returns:
- The model for the type argument for the type parameter defined in
rawSuperType
at indextypeParameterIndex
, or an empty optional if the current type does not extendrawSuperType
. Implementations may decide to return a model of the raw type argument, or to retain generics information.
-
arrayElementType
Optional<? extends PojoGenericTypeModel<?>> arrayElementType()
- Returns:
- The model for the array element type, or an empty optional if the current type is not an array type. Implementations may decide to return a model of the raw array element type, or to retain generics information.
-
-