Interface PojoRawTypeModel<T>

Type Parameters:
T - The pojo type
All Superinterfaces:
MappableTypeModel, PojoTypeModel<T>
All Known Implementing Classes:
AbstractPojoHCAnnRawTypeModel, AbstractPojoRawTypeModel

public interface PojoRawTypeModel<T> extends PojoTypeModel<T>, MappableTypeModel
A PojoTypeModel representing a raw type, where generic type parameters are ignored.

This excludes in particular parameterized types such as ArrayList<Integer>, because we cannot tell the difference between instances of such types and instances of the same type with different parameters, such as ArrayList<String>. Thus the mapper would be unable to find which mapping to use when indexing such an instance, and it would be impossible to target the index from the Class only.

See Also:
  • Method Details

    • rawType

      default PojoRawTypeModel<T> rawType()
      Specified by:
      rawType in interface PojoTypeModel<T>
      Returns:
      this.
    • typeIdentifier

      PojoRawTypeIdentifier<T> typeIdentifier()
      Returns:
      The identifier for this type.
    • ascendingSuperTypes

      Stream<? extends PojoRawTypeModel<? super T>> ascendingSuperTypes()
      Specified by:
      ascendingSuperTypes in interface MappableTypeModel
      Returns:
      The supertypes of the current type, in ascending order.
    • descendingSuperTypes

      Stream<? extends PojoRawTypeModel<? super T>> descendingSuperTypes()
      Specified by:
      descendingSuperTypes in interface MappableTypeModel
      Returns:
      The supertypes of the current type, in descending order.
    • annotations

      Stream<Annotation> annotations()
      Returns:
      All annotations on this specific type (non-inherited annotations from supertype are excluded).
    • mainConstructor

      PojoConstructorModel<T> mainConstructor()
      Returns:
      The main constructor of this type. The main constructor only exists if this type defines a single constructor.
      Throws:
      SearchException - If there is no main constructor for this type.
    • constructor

      PojoConstructorModel<T> constructor(Class<?>... parameterTypes)
      Parameters:
      parameterTypes - The type of parameters to the returned constructor.
      Returns:
      The constructor of this type whose parameters have the given parameterTypes.
      Throws:
      SearchException - If there is no constructor with parameters of the given types.
    • declaredConstructors

      Collection<PojoConstructorModel<T>> declaredConstructors()
      Returns:
      All accessible constructors of this type.
    • declaredProperties

      Collection<PojoPropertyModel<?>> declaredProperties()
      Returns:
      All declared properties of this type.
    • cast

      PojoTypeModel<? extends T> cast(PojoTypeModel<?> other)
      Parameters:
      other - The type to cast to this type.
      Returns:
      A new type model, representing the given type cast to this type. If casting is not possible, returns this. If casting is possible, the returned type model will retain as much contextual type information as possible (type arguments, ...), so casting List<Integer> to Collection for example would return Collection<Integer>.
    • caster

      PojoCaster<T> caster()
      Returns:
      A PojoCaster targeting this type.