public static <T,U>void checkTypeParameterIsAssignable(Class<T> paramDefiningClass1,String paramName1,T object1,Class<U> paramDefiningClass2,String paramName2,U object2) throws ResourceInitializationException {
  java.lang.reflect.Type type1=ReflectionUtil.getTypeArgument(paramDefiningClass1,paramName1,object1);
  java.lang.reflect.Type type2=ReflectionUtil.getTypeArgument(paramDefiningClass2,paramName2,object2);
  if (type1 == null && type2 == null) {
    return;
  }
  if (type1 == null || type2 == null || !ReflectionUtil.isAssignableFrom(type1,type2)) {
    throw CleartkInitializationException.incompatibleTypeParameters(object1,paramName1,type1,object2,paramName2,type2);
  }
}

public static < T , U > void checkTypeParameterIsAssignable ( Class < T > paramDefiningClass1 , String paramName1 , T object1 , Class < U > paramDefiningClass2 , String paramName2 , U object2 ) throws ResourceInitializationException { java . lang . reflect . Type type1 = ReflectionUtil . getTypeArgument ( paramDefiningClass1 , paramName1 , object1 ) ; java . lang . reflect . Type type2 = ReflectionUtil . getTypeArgument ( paramDefiningClass2 , paramName2 , object2 ) ; if ( type1 == null && type2 == null ) { return ; } if ( type1 == null || type2 == null || ! ReflectionUtil . isAssignableFrom ( type1 , type2 ) ) { throw CleartkInitializationException . incompatibleTypeParameters ( object1 , paramName1 , type1 , object2 , paramName2 , type2 ) ; } }
checks that the given type parameters of the given objects are compatible . type parameters are identified by providing the class in which the type parameter is defined , and the declared name of the type parameter . throws a resourceinitializationexception if the type parameters are not compatible .
