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 ASTT- The type typeB- The binding typeTB- The type binding typeS- The scope type (optional)QI- The type used to represent qualified identifiersR- 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 Summary
Modifier and Type Method Description voidcollectTo(List<N> potentialRelatedExpressions)default StringgetKindOfRelatedExpressionToBeRealized()To be invoked when a related expression resolved with this strategy is realized to obtain the kind of related expression that applies after realization.voidstopCollection()List<Perspectivation>underspecifyRelatedExpression(R relatedExpression, List<org.apache.commons.lang3.tuple.Pair<LocalTempVariableContents,String>> variableContentsAndAnaphors, S scope)Create a perspectivations for the related expression
-
Method Details
-
collectTo
-
stopCollection
void 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 returnsLocalVariableDeclarationStrategy.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.
-