Here you can find the source of instanceOf(Class left, Class right)
Parameter | Description |
---|---|
left | a parameter |
right | a parameter |
public static boolean instanceOf(Class left, Class right)
//package com.java2s; //License from project: Apache License public class Main { /**/*w w w .ja va 2s . c o m*/ * Check if left type is same type or subtype of right type using same conventions * as java instanceof expression but apply to type. * * @param left * @param right * @return */ public static boolean instanceOf(Class left, Class right) { return left.isAssignableFrom(right); } }