public static void isInstanceOf(final Class<?> type, final Object obj, final String message, final Object... values) {
        // TODO when breaking BC, consider returning obj
        if (type.isInstance(obj) == false) {
            throw new IllegalArgumentException(String.format(message, values));
        }
    }
<p>Validate that the argument is an instance of the specified class; otherwise
throwing an exception with the specified message. This method is useful when
validating according to an arbitrary class</p>

<pre>Validate.isInstanceOf(OkClass.class, object, "Wrong class, object is of class %s",
  object.getClass().getName());</pre>

@param type  the class the object must be validated against, not null
@param obj  the object to check, null throws an exception
@param message  the {@link String#format(String, Object...)} exception message if invalid, not null
@param values  the optional values for the formatted exception message, null array not recommended
@throws IllegalArgumentException if argument is not of specified class
@see #isInstanceOf(Class, Object)

@since 3.0
replugin-host-library/replugin-host-lib/src/main/java/com/qihoo360/replugin/utils/Validate.java