Package de.monochromata.anaphors.ast.spi
Interface RelatedExpressionsSpi<N,E,T,B,MB extends B,TB extends B,S,I,QI,EV,PP,R extends RelatedExpression<N,T,B,TB,S,QI,R>>
- Type Parameters:
N- The node type in the ASTE- The expression type The class instance creation expression node typeT- The type typeB- The binding typeMB- The method binding typeTB- The type binding typeS- The scope type (optional)I- The type used to represent identifiersQI- The type used to represent qualified identifiersEV- The type of the event contained in the condition that is evaluated to check when the perspectivations shall be applied.PP- The type used for positions that carry perspectivationsR- The sub-type of related expression to use
public interface RelatedExpressionsSpi<N,E,T,B,MB extends B,TB extends B,S,I,QI,EV,PP,R extends RelatedExpression<N,T,B,TB,S,QI,R>>
A special service provider interface to perform actions related to finding
and processing related expressions.
-
Method Summary
Modifier and Type Method Description booleancompare(N node1, N node2)Compares all strings occurring in the two AST nodes.PPcreatePositionForNode(N node, Predicate<EV> condition, List<Perspectivation> perspectivations)intgetColumn(N node)StringgetDescription(N node)Set<Feature<QI>>getFeatures(N relatedExpression)IgetIdentifier(TB typeBinding)intgetLength(I identifier)intgetLengthOfSimpleNameOfType(T type)intgetLine(N node)TgetReservedTypeVar(S scope)default IguessTempName(R relatedExpression, String anaphor, LocalTempVariableContents localTempVariableContents, S scope)IguessTempName(R relatedExpression, List<org.apache.commons.lang3.tuple.Pair<LocalTempVariableContents,String>> indirectionsAndAnaphors, S scope)booleanhasInitializer(N node, N potentialInitializer)StringidentifierToString(I identifier)booleanisOnlyFragmentOfMultiVariable(N node1, N node2)StringqualifiedIdentifierToString(QI qualifiedIdentifier)MBresolveMethodInvocationBinding(N relatedExpression, S scope)default booleansupportsLocalVariableTypeInference(S scope)QItoQualifiedIdentifier(I identifier)
-
Method Details
-
isOnlyFragmentOfMultiVariable
- Returns:
- true if the
node1is able to declare more than one variable butnode2is the only variable declaration thatnode1actually contains.
-
hasInitializer
-
getReservedTypeVar
-
getFeatures
-
compare
Compares all strings occurring in the two AST nodes.- Throws:
IllegalArgumentException- if the given nodes do not have the same type.
-
getDescription
-
getLine
-
getColumn
-
getIdentifier
-
getLengthOfSimpleNameOfType
-
getLength
-
guessTempName
I guessTempName(R relatedExpression, List<org.apache.commons.lang3.tuple.Pair<LocalTempVariableContents,String>> indirectionsAndAnaphors, S scope) -
toQualifiedIdentifier
-
resolveMethodInvocationBinding
-
identifierToString
-
qualifiedIdentifierToString
-
supportsLocalVariableTypeInference
-
createPositionForNode
-