Here you can find the source of assertSameClazz(Object object, Object defaults)
private static void assertSameClazz(Object object, Object defaults)
//package com.java2s; //License from project: Open Source License public class Main { private static void assertSameClazz(Object object, Object defaults) { if (!object.getClass().equals(defaults.getClass())) { throw new RuntimeException("Objects must have the same class: " + object.getClass().getName() + " != " + defaults.getClass().getName()); }// ww w .ja v a2s .co m } }