Interface RelatedExpressionStrategy<N,​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
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
All Superinterfaces:
Strategy
All Known Subinterfaces:
LocalTempVariableIntroducingStrategy<N,​E,​T,​B,​TB,​S,​I,​QI,​R,​A>
All Known Implementing Classes:
AbstractLocalTempVariableIntroducingStrategy, AbstractRelatedExpressionStrategy, ClassInstanceCreationStrategy, LocalVariableDeclarationStrategy, MethodInvocationStrategy, ParameterDeclarationStrategy

public interface RelatedExpressionStrategy<N,​T,​B,​TB extends B,​S,​QI,​R extends RelatedExpression<N,​T,​B,​TB,​S,​QI,​R>>
extends Strategy
A strategy for identifying and handling related expressions.
  • Method Details

    • collectTo

      void collectTo​(List<N> potentialRelatedExpressions)
    • stopCollection

    • underspecifyRelatedExpression

      List<Perspectivation> underspecifyRelatedExpression​(R relatedExpression, List<org.apache.commons.lang3.tuple.Pair<LocalTempVariableContents,​String>> variableContentsAndAnaphors, S scope)
      Create a perspectivations for the related expression
    • getKindOfRelatedExpressionToBeRealized

      To be invoked when a related expression resolved with this strategy is realized to obtain the kind of related expression that applies after realization. All related expression strategies either represent parameters, local variables or introduce local variables. Hence, this method typically returns LocalVariableDeclarationStrategy.LVD_KIND.

      That realized kind will also apply when the anaphora is re-resolved. Thus setting the realized kind in the beginning will avoid a faux change being detected during re-resolution of the unmodified anaphora relation.