Class SyntheticPojoGenericTypeModel<T>

    • Method Detail

      • name

        public String name()
        Returns:
        A human-readable name for this type.
      • castTo

        public <U> Optional<PojoTypeModel<? extends U>> castTo​(Class<U> target)
        Type Parameters:
        U - The type to cast to.
        Parameters:
        target - The type to cast to.
        Returns:
        A new type model, representing the current type cast to the given type, or Optional.empty() if casting is not supported. The 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>.
      • arrayElementType

        public Optional<PojoTypeModel<?>> 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.
      • typeArgument

        public Optional<? extends PojoTypeModel<?>> typeArgument​(Class<?> rawSuperType,
                                                                 int typeParameterIndex)
        Parameters:
        rawSuperType - The supertype to resolve type parameters for
        typeParameterIndex - The index of the type parameter to resolve
        Returns:
        The model for the type argument for the type parameter defined in rawSuperType at index typeParameterIndex, or an empty optional if the current type does not extend rawSuperType. Implementations may decide to return a model of the raw type argument, or to retain generics information.