@Test public void testFailingWildcard() throws Exception { final Type fromType = ClassWithSuperClassWithGenericType.class.getDeclaredMethod("methodWithGenericReturnType") .getGenericReturnType(); final WildcardType failingToType = new WildcardTypeImpl(null, new Type[] { ClassWithSuperClassWithGenericType.class }); assertTrue(TypeUtils.isAssignable(fromType, failingToType)); }
public static boolean isAssignable(final Type type, final Type toType) { return isAssignable(type, toType, null); }
TypeUtils { public static boolean isAssignable(final Type type, final Type toType) { return isAssignable(type, toType, null); } }
TypeUtils { public static boolean isAssignable(final Type type, final Type toType) { return isAssignable(type, toType, null); } private  TypeUtils(); }
TypeUtils { public static boolean isAssignable(final Type type, final Type toType) { return isAssignable(type, toType, null); } private  TypeUtils(); static boolean isAssignable(final Type type, final Type toType); static Type[] normalizeUpperBounds(final Type[] bounds); static boolean equals(final Type t1, final Type t2); static String toString(final Type type); static int[] add(int[] array, int element); }
TypeUtils { public static boolean isAssignable(final Type type, final Type toType) { return isAssignable(type, toType, null); } private  TypeUtils(); static boolean isAssignable(final Type type, final Type toType); static Type[] normalizeUpperBounds(final Type[] bounds); static boolean equals(final Type t1, final Type t2); static String toString(final Type type); static int[] add(int[] array, int element);  }