code: private static void addMBeanIdentifier(Query query, Result result, StringBuilder sb) {
  		if (result.getKeyAlias() != null) {
  			sb.append(result.getKeyAlias());
  		} else if (query.isUseObjDomainAsKey()) {
  			sb.append(StringUtils.cleanupStr(result.getObjDomain(), query.isAllowDottedKeys()));
  		} else {
  			sb.append(StringUtils.cleanupStr(result.getClassName()));
  		}
  	}
docs: Adds a key to the StringBuilder
  
  It uses in order of preference:
  
  1. resultAlias if that was specified as part of the query
  2. The domain portion of the ObjectName in the query if useObjDomainAsKey is set to true
  3. else, the Class Name of the MBean. I.e. ClassName will be used by default if the
  user doesn't specify anything special
  @param query
  @param result
  @param sb