createTypeVariable
public static TypeVariable createTypeVariable(TypeVariable typeVariable,
Type... bounds)
Java TypeVariable is different in various JDK versions. Thus it is not possible to e.g.
write a custom TypeVariable which works in either Java7 and Java8 as they introduced
new methods in Java8 which have return types which only exist in Java8 :(
As workaround we dynamically crate a proxy to wrap this and do the delegation manually.
This is of course slower, but as we do not use it often it might not have much impact.
- Parameters:
typeVariable -
bounds -
- Returns:
- the typeVariable with the defined bounds.