private static BindingProxy getBindingProxy(Class<?> typeClass) { if (typeClass.isPrimitive()) { typeClass = getWrapperClassForPrimitiveType(typeClass); } for (final BindingProxy proxy : BINDING_PROXY_LIST) { if (proxy.getTypeClass().isAssignableFrom(typeClass)) { return proxy; } } // won't happen throw new RuntimeException(); }
public static void unbind(final Class<?> typeClass, final Object propertyModel) { final BindingProxy bindingProxy = getBindingProxy(typeClass); bindingProxy.getPropertyModelProxy().unbind(propertyModel); }
public static void bind( final Class<?> typeClass, final Object propertyModel, final Object observableValue) { final BindingProxy bindingProxy = getBindingProxy(typeClass); bindingProxy.getPropertyModelProxy().bind(propertyModel, observableValue); }
public static void setWritableValue( final Class<?> typeClass, final Object writableValue, final Object value) { final BindingProxy bindingProxy = getBindingProxy(typeClass); bindingProxy.getWritableValueProxy().setValue(writableValue, value); }
public static Object getObservableValue(final Class<?> typeClass, final Object observableValue) { final BindingProxy bindingProxy = getBindingProxy(typeClass); return bindingProxy.getObservableValueProxy().getValue(observableValue); }
public static Object createVariable(final Class<?> typeClass) { final BindingProxy bindingProxy = getBindingProxy(typeClass); return bindingProxy.getVariableFactory().createVariable(); }