Class OwbTypeVariableImpl
- java.lang.Object
-
- org.apache.camel.maven.packaging.generics.OwbTypeVariableImpl
-
public class OwbTypeVariableImpl extends Object
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
OwbTypeVariableImpl.OwbTypeVariableInvocationHandler
-
Constructor Summary
Constructors Constructor Description OwbTypeVariableImpl()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static TypeVariable
createTypeVariable(TypeVariable typeVariable, Type... bounds)
Java TypeVariable is different in various JDK versions.
-
-
-
Method Detail
-
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 generics 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.
-
-