code: public Class<? extends MonetaryAmount> getAmountType(MonetaryAmountFactoryQuery query) {
          MonetaryAmountFactory<?> f = getAmountFactory(query);
          if (f != null) {
              return f.getAmountType();
          }
          return null;
      }
docs: Executes the query and returns the {@link javax.money.MonetaryAmount} implementation type found,
  if there is only one type.
  If multiple types match the query, the first one is selected.
  
  @param query the factory query, not null.
  @return the type found, or null.