Interface RelatedExpressionsCollector<E,​S>

Type Parameters:
E - The expression type
S - The scope type (optional)

public interface RelatedExpressionsCollector<E,​S>
An interface to objects used to traverse the AST to find potential related expressions.

Note that the implementations of this interface may support only a limited set of RelatedExpressionTypes.

  • Method Summary

    Modifier and Type Method Description
    List<org.apache.commons.lang3.tuple.Pair<RelatedExpressionType,​E>> traverse​(E definiteExpression, S scope)
    Traverse the body declaration that contains the given definite expression.
  • Method Details

    • traverse

      List<org.apache.commons.lang3.tuple.Pair<RelatedExpressionType,​E>> traverse​(E definiteExpression, S scope)
      Traverse the body declaration that contains the given definite expression.

      TODO: Rename the method to make clear that the enclosing body declaration is to be traversed?

      TODO: There might be related expression that do not traverse the body enclosing the given definite expression but that check whether that body is reachable from some place

      Parameters:
      definiteExpression - The definite expression whose enclosing body is to be traversed.
      scope - The scope containing the definite expression if used by the compiler-specific implementation. Implementations of this method must not access the scope but merely pass it on to SPI's they invoke.
      Returns:
      collected potential related expressions