public static void isInstanceOf(Class type, Object obj, String message) {
        notNull(type, "Type to check against must not be null");
        if (!type.isInstance(obj)) {
            throw new IllegalArgumentException(message
                    + "Object of class [" + (obj != null ? obj.getClass().getName() : "null")
                    + "] must be an instance of " + type);
        }
    }
Assert that the provided object is an instance of the provided class.
<pre class="code">Assert.instanceOf(Foo.class, foo);</pre>

@param type    the type to check against
@param obj     the object to check
@param message a message which will be prepended to the message produced by
               the function itself, and which may be used to provide context. It should
               normally end in a ": " or ". " so that the function generate message looks
               ok when prepended to it.
@throws IllegalArgumentException if the object is not an instance of clazz
@see Class#isInstance
lang/src/main/java/org/apache/shiro/lang/util/Assert.java