Interface RelatedExpressionsCollector<N,​E,​T,​B,​TB extends B,​S,​QI,​R extends RelatedExpression<N,​T,​B,​TB,​S,​QI,​R>>

Type Parameters:
N - The node type in the AST
E - The expression type
T - The type type
B - The binding type
TB - The type binding type
S - The scope type (optional)
QI - The type used to represent qualified identifiers
R - The sub-type of related expression to use

public interface RelatedExpressionsCollector<N,​E,​T,​B,​TB extends B,​S,​QI,​R extends RelatedExpression<N,​T,​B,​TB,​S,​QI,​R>>
An interface to objects used to traverse the AST to find potential related expressions.

Note that the implementations of this interface may choose to support only a fixed set of RelatedExpressionStrategy instances.

  • Method Summary

    Modifier and Type Method Description
    List<R> traverse​(E definiteExpression, S scope)
    Traverse the body declaration that contains the given definite expression.
  • Method Details

    • traverse

      List<R> 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