Between java auto boxed types and primitive data types, which way is the class assignable from? Simple.
Long ln = 1L; //autoboxing (assignable) assertTrue(Number.class.isAssignableFrom(ln.getClass())); assertTrue(Long.class.isAssignableFrom(ln.getClass())); assertFalse(long.class.isAssignableFrom(ln.getClass()));