@ Override public boolean supports ( TherianContext context , Copy < ? extends Object , ? extends Map > copy ) { if ( ! super . supports ( context , copy ) ) { return false ; } final Type targetKeyType = getKeyType ( copy . getTargetPosition ( ) ) ; final Position . ReadWrite < ? > targetKey = Positions . readWrite ( targetKeyType ) ; return getProperties ( context , copy . getSourcePosition ( ) ) . anyMatch ( propertyName -> context . supports ( Convert . to ( targetKey , Positions . readOnly ( propertyName ) ) ) ) ; }
If at least one property name can be converted to an assignable key say the operation is supported and we ll give it a shot .