Package de.monochromata.anaphors.ast.spi
Interface TransformationsSpi<N,E,T,B,TB extends B,S,I,QI,R extends RelatedExpression<N,T,B,TB,S,QI,R>,A extends ASTBasedAnaphora<N,E,T,B,TB,S,I,QI,R,A>>
- Type Parameters:
N- The node type in the ASTE- The expression typeT- The type typeB- The binding typeTB- The type binding typeS- The scope type (optional)I- The type used to represent identifiersQI- The type used to represent qualified identifiersR- The sub-type of related expression to useA- The sub-type of AST-based anaphora to use
public interface TransformationsSpi<N,E,T,B,TB extends B,S,I,QI,R extends RelatedExpression<N,T,B,TB,S,QI,R>,A extends ASTBasedAnaphora<N,E,T,B,TB,S,I,QI,R,A>>
An interface to create AST transformations.
-
Method Summary
Modifier and Type Method Description booleanpartOfSameInvocable(N node, E expression)ASTTransformation<N,E,T,B,TB,S,I,QI,R,A>passAlongCallChain(N upstreamNode, E downstreamExpression, S scope)Attempts to create a transformation that pass the given upstream node or a representation of it along the call chain from the invocable (i.e.
-
Method Details
-
partOfSameInvocable
- Returns:
- true if both nodes are contained in or are the same invocable (i.e. initializer, constructor, method or lambda expression).
-
passAlongCallChain
ASTTransformation<N,E,T,B,TB,S,I,QI,R,A> passAlongCallChain(N upstreamNode, E downstreamExpression, S scope)Attempts to create a transformation that pass the given upstream node or a representation of it along the call chain from the invocable (i.e. initializer, constructor, method or lambda expression) containing the upstream node to the invocable containing the downstream node.Such a transformation can only be constructed if there is a call chain connecting upstream and downstream nodes and if the chain is no longer than the implementation-specific analysis limits of the SPI implementation.
- Returns:
- a transformation if it can be constructed, or null otherwise.
-