001package de.monochromata.anaphors.ast.relatedexp.strategy;
002
003import de.monochromata.anaphors.ast.ASTBasedAnaphora;
004import de.monochromata.anaphors.ast.relatedexp.RelatedExpression;
005import de.monochromata.anaphors.ast.spi.RelatedExpressionsSpi;
006import de.monochromata.anaphors.preferences.Preferences;
007
008/**
009 * Method invocation expressions functioning as related expression.
010 *
011 * @param <N>  The node type in the AST
012 * @param <E>  The expression type
013 * @param <T>  The type type
014 * @param <B>  The binding type
015 * @param <MB> The method binding type
016 * @param <TB> The type binding type
017 * @param <S>  The scope type (optional)
018 * @param <I>  The type used to represent identifiers
019 * @param <QI> The type used to represent qualified identifiers
020 * @param <EV> The type of the event contained in the condition that is
021 *             evaluated to check when the perspectivations shall be applied.
022 * @param <PP> The type used for positions that carry perspectivations
023 * @param <R>  The sub-type of related expression to use
024 * @param <A>  The sub-type of AST-based anaphora to use
025 */
026public class MethodInvocationStrategy<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 extends ASTBasedAnaphora<N, E, T, B, TB, S, I, QI, R, A>>
027        extends AbstractLocalTempVariableIntroducingStrategy<N, E, T, B, MB, TB, S, I, QI, EV, PP, R, A> {
028
029    public static final String MI_KIND = "MI";
030
031    /**
032     * Used in contract testing.
033     */
034    @SuppressWarnings("unused")
035    protected MethodInvocationStrategy() {
036    }
037
038    public MethodInvocationStrategy(
039            final RelatedExpressionsSpi<N, E, T, B, MB, TB, S, I, QI, EV, PP, R> relatedExpressionsSpi,
040            final Preferences preferences) {
041        super(relatedExpressionsSpi, preferences);
042    }
043
044    @Override
045    public String getKind() {
046        return MI_KIND;
047    }
048}