@Test public void testResolvingReferencedConditionalsForUnboundedVariable() { String questionText = "question: \"Label\" boolean"; String conditionText = "if (test) { question2: \"Label\" boolean }"; Form form = FormBuilder.build(TestHelper.buildForm("form1", questionText, conditionText)); ReferenceResolver referencesResolver = new ReferenceResolver(form); assertThat(referencesResolver.getReferencedConditionals(QUESTION)).isEmpty(); }
public Collection<Conditional> getReferencedConditionals(final Identifier variableName) { return conditionalReferences.get(variableName); }
ReferenceResolver implements FormVisitor<Void>, StatementVisitor<Void> { public Collection<Conditional> getReferencedConditionals(final Identifier variableName) { return conditionalReferences.get(variableName); } }
ReferenceResolver implements FormVisitor<Void>, StatementVisitor<Void> { public Collection<Conditional> getReferencedConditionals(final Identifier variableName) { return conditionalReferences.get(variableName); } ReferenceResolver(final Form form); }
ReferenceResolver implements FormVisitor<Void>, StatementVisitor<Void> { public Collection<Conditional> getReferencedConditionals(final Identifier variableName) { return conditionalReferences.get(variableName); } ReferenceResolver(final Form form); Collection<ComputedQuestion> getReferencedQuestions(final Identifier variableName); Collection<Conditional> getReferencedConditionals(final Identifier variableName); @Override Void visit(final Form form); @Override Void visit(final ComputedQuestion question); @Override Void visit(final Question statement); @Override Void visit(final Conditional conditional); }
ReferenceResolver implements FormVisitor<Void>, StatementVisitor<Void> { public Collection<Conditional> getReferencedConditionals(final Identifier variableName) { return conditionalReferences.get(variableName); } ReferenceResolver(final Form form); Collection<ComputedQuestion> getReferencedQuestions(final Identifier variableName); Collection<Conditional> getReferencedConditionals(final Identifier variableName); @Override Void visit(final Form form); @Override Void visit(final ComputedQuestion question); @Override Void visit(final Question statement); @Override Void visit(final Conditional conditional);  }