void (GenericInterface raw, GenericInterface<? super String> superGeneric, GenericInterface<? extends CharSequence> extendGeneric, NotGenericInterface notGenericInterface) { //unchecked ChildGenericClass<String> notRaw = <warning descr="Unchecked cast: 'UncheckedWarningWithCast.GenericInterface' to 'UncheckedWarningWithCast.ChildGenericClass<java.lang.String>'">(ChildGenericClass<String>) raw</warning>; ChildGenericClass<?> superWildcardGenericCast = (ChildGenericClass<?>) superGeneric; ChildGenericClass<?> extendWildcardGenericCast = (ChildGenericClass<?>) extendGeneric; ChildGenericClass<? super String> superEqualGenericCast = (ChildGenericClass<? super String>) superGeneric; ChildGenericClass<? extends CharSequence> extendEqualGenericCast = (ChildGenericClass<? extends CharSequence>) extendGeneric; //unchecked ChildGenericClass<Object> superUpperBoundGenericCast = <warning descr="Unchecked cast: 'UncheckedWarningWithCast.GenericInterface<capture<? super java.lang.String>>' to 'UncheckedWarningWithCast.ChildGenericClass<java.lang.Object>'">(ChildGenericClass<Object>) superGeneric</warning>; //unchecked ChildGenericClass<CharSequence> extendUpperBoundGenericCast = <warning descr="Unchecked cast: 'UncheckedWarningWithCast.GenericInterface<capture<? extends java.lang.CharSequence>>' to 'UncheckedWarningWithCast.ChildGenericClass<java.lang.CharSequence>'">(ChildGenericClass<CharSequence>) extendGeneric</warning>; //unchecked ChildGenericClass<? super Integer> superNotRelatedGenericCast = <warning descr="Unchecked cast: 'UncheckedWarningWithCast.GenericInterface<capture<? super java.lang.String>>' to 'UncheckedWarningWithCast.ChildGenericClass<? super java.lang.Integer>'">(ChildGenericClass<? super Integer>) superGeneric</warning>; //unchecked ChildGenericClass<? extends String> extendNotCoveredGenericCast = <warning descr="Unchecked cast: 'UncheckedWarningWithCast.GenericInterface<capture<? extends java.lang.CharSequence>>' to 'UncheckedWarningWithCast.ChildGenericClass<? extends java.lang.String>'">(ChildGenericClass<? extends String>) extendGeneric</warning>; //not compile ChildGenericClass<? super Integer> superNotGenericCast = <error descr="Inconvertible types; cannot cast 'UncheckedWarningWithCast.NotGenericInterface' to 'UncheckedWarningWithCast.ChildGenericClass<? super java.lang.Integer>'">(ChildGenericClass<? super Integer>) notGenericInterface</error>; //not compile ChildGenericClass<? extends String> extendNotGenericCast = <error descr="Inconvertible types; cannot cast 'UncheckedWarningWithCast.NotGenericInterface' to 'UncheckedWarningWithCast.ChildGenericClass<? extends java.lang.String>'">(ChildGenericClass<? extends String>) notGenericInterface</error>; }