Java Class InstanceOf instanceOf(Class left, Class right)

Here you can find the source of instanceOf(Class left, Class right)

Description

Check if left type is same type or subtype of right type using same conventions as java instanceof expression but apply to type.

License

Apache License

Parameter

Parameter Description
left a parameter
right a parameter

Declaration

public static boolean instanceOf(Class left, Class right) 

Method Source Code

//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);
    }
}

Related

  1. instanceOf(Class clazz, Class superClass)
  2. instanceOf(Class clazz, Class target)
  3. instanceOf(Class tester, Class instance)
  4. instanceOf(Class beanClass, Object element)
  5. instanceOf(Class objectClass, Class typeClass)
  6. instanceOf(Class parant, Class chield)