private static void checkAliasesByReturn(Map<Return, String[]> aliasesByReturn) {
if ( aliasesByReturn == null || aliasesByReturn.size() == 0 ) {
throw new IllegalArgumentException( "No return aliases defined" );
}
for ( Map.Entry<Return,String[]> entry : aliasesByReturn.entrySet() ) {
final Return aReturn = entry.getKey();
final String[] aliases = entry.getValue();
if ( aReturn == null ) {
throw new IllegalArgumentException( "null key found in aliasesByReturn" );
}
if ( aliases == null || aliases.length == 0 ) {