@Test public void equals_equal_returnsTrue() { setSomeValues(q); setSomeOtherValues(q); PossibleProperties other = InterfaceMap.createInstance(PossibleProperties.class, new HashMap<String, Object>(map)); assertEquals(q, other); assertEquals(other, q); }
@SuppressWarnings("unchecked") public static <T> T createInstance(Class<T> interfaceClass, Map<String, Object> backingMap) { return (T) Proxy.newProxyInstance(interfaceClass.getClassLoader(), new Class[] { interfaceClass }, new BackingMapInvocationHandler(backingMap, interfaceClass)); }
InterfaceMap { @SuppressWarnings("unchecked") public static <T> T createInstance(Class<T> interfaceClass, Map<String, Object> backingMap) { return (T) Proxy.newProxyInstance(interfaceClass.getClassLoader(), new Class[] { interfaceClass }, new BackingMapInvocationHandler(backingMap, interfaceClass)); } }
InterfaceMap { @SuppressWarnings("unchecked") public static <T> T createInstance(Class<T> interfaceClass, Map<String, Object> backingMap) { return (T) Proxy.newProxyInstance(interfaceClass.getClassLoader(), new Class[] { interfaceClass }, new BackingMapInvocationHandler(backingMap, interfaceClass)); } private  InterfaceMap(); }
InterfaceMap { @SuppressWarnings("unchecked") public static <T> T createInstance(Class<T> interfaceClass, Map<String, Object> backingMap) { return (T) Proxy.newProxyInstance(interfaceClass.getClassLoader(), new Class[] { interfaceClass }, new BackingMapInvocationHandler(backingMap, interfaceClass)); } private  InterfaceMap(); @SuppressWarnings("unchecked") static T createInstance(Class<T> interfaceClass, Map<String, Object> backingMap); static T createInstance(Class<T> interfaceClass); static boolean isDynamicObject(Object object); static Class<?> getClass(Object dynamicObject); static Map<String, Object> getBackingMap(Object dynamicObject); }
InterfaceMap { @SuppressWarnings("unchecked") public static <T> T createInstance(Class<T> interfaceClass, Map<String, Object> backingMap) { return (T) Proxy.newProxyInstance(interfaceClass.getClassLoader(), new Class[] { interfaceClass }, new BackingMapInvocationHandler(backingMap, interfaceClass)); } private  InterfaceMap(); @SuppressWarnings("unchecked") static T createInstance(Class<T> interfaceClass, Map<String, Object> backingMap); static T createInstance(Class<T> interfaceClass); static boolean isDynamicObject(Object object); static Class<?> getClass(Object dynamicObject); static Map<String, Object> getBackingMap(Object dynamicObject);  }