public MarshallerRegistry merge ( MarshallerRegistry . Builder marshallerRegistryOverrides ) { if ( marshallerRegistryOverrides == null ) { return this ; } Builder merged = MarshallerRegistry . builder ( ) ; merged . copyMarshallersFromRegistry ( this . marshallers ) ; merged . copyMarshallersFromRegistry ( marshallerRegistryOverrides . marshallers ) ; return merged . build ( ) ; }
Merge the given overrides with this registry . Overrides are higher precedence than this registry . Both this registry and the override registry are immutable so a new registry object is returned . If the marshallerRegistryOverrides are null then this method just returns the current registry since there is nothing to merge .