class SoqlQueryAnalyzer {

    public List getFieldDefinitions() {
        if (fieldDefinitions == null) {
            fieldDefinitions = new ArrayList<>();
            SelectSpecVisitor visitor = new SelectSpecVisitor();
            getQueryData().getSelectSpecs()
                    .forEach(spec -> spec.accept(visitor));
        }
        return fieldDefinitions;
    }

    public  SoqlQueryAnalyzer(String soql, Function<String, DescribeSObjectResult> objectDescriptor);
    public  SoqlQueryAnalyzer(String soql, Function<String, DescribeSObjectResult> objectDescriptor, Map<String, DescribeSObjectResult> describedObjectsCache);

}