Here you can find the source of instanceOf(Class tester, Class instance)
public static boolean instanceOf(Class tester, Class instance)
//package com.java2s; //License from project: Open Source License public class Main { public static boolean instanceOf(Class tester, Class instance) { try {/* www .j a v a 2 s.co m*/ tester.asSubclass(instance); return true; } catch (Exception ignored) { } return false; } }