* @return the underlying string bridge or {@code null} if we can't extract it
*/
public static TwoWayStringBridge getTwoWayStringBridge(TwoWayFieldBridge fieldBridge) {
if ( fieldBridge instanceof NullEncodingTwoWayFieldBridge ) {
NullEncodingTwoWayFieldBridge encoding = (NullEncodingTwoWayFieldBridge) fieldBridge;
return getTwoWayStringBridge( encoding.unwrap() );
}
else if ( fieldBridge instanceof TwoWayString2FieldBridgeAdaptor ) {
TwoWayString2FieldBridgeAdaptor adaptor = (TwoWayString2FieldBridgeAdaptor) fieldBridge;
return adaptor.unwrap();
}