code: public MonetaryRounding getRounding(RoundingQuery roundingQuery) {
          if (roundingQuery.get(GregorianCalendar.class) != null || roundingQuery.get(Calendar.class) != null) {
              return null;
          }
          CurrencyUnit currency = roundingQuery.getCurrency();
          if (currency != null) {
              RoundingMode roundingMode = roundingQuery.get(RoundingMode.class);
              if (roundingMode == null) {
                  roundingMode = RoundingMode.HALF_EVEN;
              }
              if (Boolean.TRUE.equals(roundingQuery.getBoolean("cashRounding"))) {
                  if (currency.getCurrencyCode().equals("CHF")) {
                      return new DefaultCashRounding(currency, RoundingMode.HALF_UP, 5);
                  } else {
                      return new DefaultCashRounding(currency, 1);
                  }
              }
              return new DefaultRounding(currency, roundingMode);
          }
          Integer scale = roundingQuery.getScale();
          if (scale == null) {
              scale = 2;
          }
          MathContext mc = roundingQuery.get(MathContext.class);
          RoundingMode roundingMode = roundingQuery.get(RoundingMode.class);
          if (mc != null) {
              return new DefaultRounding(scale, mc.getRoundingMode());
          } else if (roundingMode != null) {
              return new DefaultRounding(scale, roundingMode);
          } else if (roundingQuery.getRoundingName() != null && DEFAULT_ROUNDING_NAME.equals(roundingQuery.getRoundingName())) {
              return Monetary.getDefaultRounding();
          }
          return null;
      }
docs: Evaluate the rounding that match the given query.
  
  @return the (shared) default rounding instances matching, never null.