Class OwbTypeVariableImpl

java.lang.Object
org.apache.camel.maven.packaging.generics.OwbTypeVariableImpl

public class OwbTypeVariableImpl extends Object
  • Constructor Details

    • OwbTypeVariableImpl

      public OwbTypeVariableImpl()
  • Method Details

    • 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.