protected JavaType getType(TypeBindings bindings, TypeVariable<?>[] typeParams) { // [JACKSON-468] Need to consider local type binding declarations too... if (typeParams != null && typeParams.length > 0) { bindings = bindings.childInstance(); for (TypeVariable<?> var : typeParams) { String name = var.getName(); // to prevent infinite loops, need to first add placeholder ("<T extends Enum<T>>" etc) bindings._addPlaceholder(name); // About only useful piece of information is the lower bound (which is at least Object.class) Type lowerBound = var.getBounds()[0]; JavaType type = (lowerBound == null) ? TypeFactory.unknownType() : bindings.resolveType(lowerBound); bindings.addBinding(var.getName(), type); } } return bindings.resolveType(getGenericType()); }
protected JavaType getType(TypeBindings bindings, TypeVariable<?>[] typeParams) { // [JACKSON-468] Need to consider local type binding declarations too... if (typeParams != null && typeParams.length > 0) { bindings = bindings.childInstance(); for (TypeVariable<?> var : typeParams) { String name = var.getName(); // to prevent infinite loops, need to first add placeholder ("<T extends Enum<T>>" etc) bindings._addPlaceholder(name); // About only useful piece of information is the lower bound (which is at least Object.class) Type lowerBound = var.getBounds()[0]; JavaType type = (lowerBound == null) ? TypeFactory.unknownType() : bindings.resolveType(lowerBound); bindings.addBinding(var.getName(), type); } } return bindings.resolveType(getGenericType()); }
protected JavaType getType(TypeBindings bindings, TypeVariable<?>[] typeParams) { // [JACKSON-468] Need to consider local type binding declarations too... if (typeParams != null && typeParams.length > 0) { bindings = bindings.childInstance(); for (TypeVariable<?> var : typeParams) { String name = var.getName(); // to prevent infinite loops, need to first add placeholder ("<T extends Enum<T>>" etc) bindings._addPlaceholder(name); // About only useful piece of information is the lower bound (which is at least Object.class) Type lowerBound = var.getBounds()[0]; JavaType type = (lowerBound == null) ? TypeFactory.unknownType() : bindings.resolveType(lowerBound); bindings.addBinding(var.getName(), type); } } return bindings.resolveType(getGenericType()); }
protected JavaType getType(TypeBindings bindings, TypeVariable<?>[] typeParams) { // [JACKSON-468] Need to consider local type binding declarations too... if (typeParams != null && typeParams.length > 0) { bindings = bindings.childInstance(); for (TypeVariable<?> var : typeParams) { String name = var.getName(); // to prevent infinite loops, need to first add placeholder ("<T extends Enum<T>>" etc) bindings._addPlaceholder(name); // About only useful piece of information is the lower bound (which is at least Object.class) Type lowerBound = var.getBounds()[0]; JavaType type = (lowerBound == null) ? TypeFactory.unknownType() : bindings.resolveType(lowerBound); bindings.addBinding(var.getName(), type); } } return bindings.resolveType(getGenericType()); }