Fields resolveArgumentSelector( Set<Scope> incomingScopes ) { Fields argumentSelector = getArgumentSelector(); try { Scope incomingScope = getFirst( incomingScopes ); if( argumentSelector.isAll() ) return resolveIncomingOperationArgumentFields( incomingScope ); if( argumentSelector.isGroup() ) return incomingScope.getOutGroupingFields(); if( argumentSelector.isValues() ) return incomingScope.getOutGroupingValueFields(); return resolveIncomingOperationArgumentFields( incomingScope ).select( argumentSelector ); } catch( FieldsResolverException exception ) { throw new OperatorException( this, OperatorException.Kind.argument, exception.getSourceFields(), argumentSelector, exception ); } catch( Exception exception ) { throw new OperatorException( this, "unable to resolve argument selector: " + argumentSelector.printVerbose(), exception ); } }