Here you can find the source of instanceOf(Class clazz, Class superClass)
@SuppressWarnings("unchecked") public static boolean instanceOf(Class clazz, Class superClass)
//package com.java2s; //License from project: Open Source License public class Main { @SuppressWarnings("unchecked") /**/*from w w w.j a v a 2 s . c o m*/ * Check if a class is a subclass of a super class. * @param clazz - The class. * @param superClass - The super class. * @return Whether the class is a subclass of a super class. */ public static boolean instanceOf(Class clazz, Class superClass) { return clazz != null && superClass != null && clazz.isAssignableFrom(superClass); } }