Class<A> clazzA = ...;
B instanceB = ...;

clazzA.cast(instanceB);

참고 자료

https://www.tutorialspoint.com/java/lang/class_cast.htm