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 protectedAbstractPojoGenericTypeModel(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()StringtoString()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
name
-
-
-
-
Constructor Detail
-
AbstractPojoGenericTypeModel
protected AbstractPojoGenericTypeModel(PojoRawTypeModel<? super T> rawTypeModel)
-
-
Method Detail
-
rawType
public final PojoRawTypeModel<? super T> rawType()
- Specified by:
rawTypein interfacePojoTypeModel<T>- Returns:
- A representation of the closest parent Java
Classfor this type.
-
property
public PojoPropertyModel<?> property(String propertyName)
- Specified by:
propertyin interfacePojoTypeModel<T>
-
typeArgument
public Optional<? extends PojoGenericTypeModel<?>> typeArgument(Class<?> rawSuperType, int typeParameterIndex)
- Specified by:
typeArgumentin 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
rawSuperTypeat 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:
arrayElementTypein 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.
-
-