public ResolvableType[] getGenerics() {
        if (this == NONE) {
            return EMPTY_TYPES_ARRAY;
        }
        ResolvableType[] genericS = this.generics;
        if (genericS == null) {
            if (this.type instanceof Class) {
                Type[] typeParams = ((Class<?>) this.type).getTypeParameters();
                genericS = new ResolvableType[typeParams.length];
                for (int i = 0; i < genericS.length; i++) {
                    genericS[i] = ResolvableType.forType(typeParams[i], this);
                }
            } else if (this.type instanceof ParameterizedType) {
                Type[] actualTypeArguments = ((ParameterizedType) this.type).getActualTypeArguments();
                genericS = new ResolvableType[actualTypeArguments.length];
                for (int i = 0; i < actualTypeArguments.length; i++) {
                    genericS[i] = forType(actualTypeArguments[i], this.variableResolver);
                }
            } else {
                genericS = resolveType().getGenerics();
            }
            this.generics = genericS;
        }
        return genericS;
    }
Return an array of {link ResolvableType ResolvableTypes} representing the generic parameters of
this type. If no generics are available an empty array is returned. If you need to
access a specific generic consider using the {link #getGeneric(int...)} method as
it allows access to nested generics and protects against
{@code IndexOutOfBoundsExceptions}.

@return an array of {link ResolvableType ResolvableTypes} representing the generic parameters
(never {@code null})
see #hasGenerics()
see #getGeneric(int...)
see #resolveGeneric(int...)
see #resolveGenerics()
analyzer/src/main/java/nl/basjes/parse/useragent/utils/springframework/core/ResolvableType.java