@SuppressWarnings("unchecked") private void unwrapProxy() { if (proxy instanceof BindableProxy<?>) { proxy = (T) ((BindableProxy<T>) proxy).unwrap(); } }
@SuppressWarnings("unchecked") private void unwrapProxy() { if (proxy instanceof BindableProxy<?>) { proxy = (T) ((BindableProxy<T>) proxy).unwrap(); } }
@SuppressWarnings("unchecked") private void unwrapProxy() { if (proxy instanceof BindableProxy<?>) { proxy = (T) ((BindableProxy<T>) proxy).unwrap(); } }
/** * Checks if the type of the provided model is bindable. That's the case when a proxy provider has * been generated for that type (the type has been annotated or configured to be bindable). * * @param model * the object to be checked, may be null. * @return true if the object is bindable, otherwise false. */ @SuppressWarnings("unchecked") public static <T> boolean isBindableType(T model) { if (model == null) { return false; } if (model instanceof BindableProxy) { model = (T) ((BindableProxy<T>) model).unwrap(); } final BindableProxyProvider proxyProvider = bindableProxyProviders.get(model.getClass()); return (proxyProvider != null); }
/** * Checks if the type of the provided model is bindable. That's the case when a proxy provider has * been generated for that type (the type has been annotated or configured to be bindable). * * @param model * the object to be checked, may be null. * @return true if the object is bindable, otherwise false. */ @SuppressWarnings("unchecked") public static <T> boolean isBindableType(T model) { if (model == null) { return false; } if (model instanceof BindableProxy) { model = (T) ((BindableProxy<T>) model).unwrap(); } final BindableProxyProvider proxyProvider = bindableProxyProviders.get(model.getClass()); return (proxyProvider != null); }
throw new RuntimeException( "Cannot convert between " + propertyType.getName() + " and " + effectiveComponentType.getName() + " for property [" + property + "] in " + proxy.unwrap().getClass().getName());
throw new RuntimeException( "Cannot convert between " + propertyType.getName() + " and " + effectiveComponentType.getName() + " for property [" + property + "] in " + proxy.unwrap().getClass().getName());