Class AbstractPojoGenericTypeModel<T>
- java.lang.Object
-
- org.hibernate.search.mapper.pojo.model.spi.AbstractPojoGenericTypeModel<T>
-
- All Implemented Interfaces:
PojoGenericTypeModel<T>
,PojoTypeModel<T>
- Direct Known Subclasses:
GenericContextAwarePojoGenericTypeModel
,SyntheticPojoGenericTypeModel
public abstract class AbstractPojoGenericTypeModel<T> extends Object implements PojoGenericTypeModel<T>
An abstract base for implementations ofPojoGenericTypeModel
.
-
-
Constructor Summary
Constructors Modifier Constructor Description protected
AbstractPojoGenericTypeModel(PojoRawTypeModel<? super T> rawTypeModel)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Optional<? extends PojoGenericTypeModel<?>>
arrayElementType()
PojoPropertyModel<?>
property(String propertyName)
PojoRawTypeModel<? super T>
rawType()
String
toString()
Optional<? extends PojoGenericTypeModel<?>>
typeArgument(Class<?> rawSuperType, int typeParameterIndex)
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface org.hibernate.search.mapper.pojo.model.spi.PojoTypeModel
castTo, name
-
-
-
-
Constructor Detail
-
AbstractPojoGenericTypeModel
protected AbstractPojoGenericTypeModel(PojoRawTypeModel<? super T> rawTypeModel)
-
-
Method Detail
-
rawType
public final PojoRawTypeModel<? super T> rawType()
- Specified by:
rawType
in interfacePojoTypeModel<T>
- Returns:
- A representation of the closest parent Java
Class
for this type.
-
property
public PojoPropertyModel<?> property(String propertyName)
- Specified by:
property
in interfacePojoTypeModel<T>
-
typeArgument
public Optional<? extends PojoGenericTypeModel<?>> typeArgument(Class<?> rawSuperType, int typeParameterIndex)
- Specified by:
typeArgument
in interfacePojoGenericTypeModel<T>
- 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
public Optional<? extends PojoGenericTypeModel<?>> arrayElementType()
- Specified by:
arrayElementType
in interfacePojoGenericTypeModel<T>
- 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.
-
-