Java tutorial
//package com.java2s; /** * (c) Winterwell Associates Ltd, used under MIT License. This file is background IP. */ public class Main { /** * The equivalent of instanceof, but for Class objects. 'cos I always forget * how to do this. * * @param possSubType * @param superType * @return true if possSubType <i>is</i> a subType of superType */ public static boolean isa(Class<?> possSubType, Class<?> superType) { return superType.isAssignableFrom(possSubType); } }