Class NoPreparationRequired<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>>

java.lang.Object
de.monochromata.anaphors.cog.transform.AbstractPreparatoryTransformation<N,​E,​T,​B,​TB,​S,​I,​QI,​R,​A>
de.monochromata.anaphors.cog.transform.NoPreparationRequired<N,​E,​T,​B,​TB,​S,​I,​QI,​R,​A>
Type Parameters:
N - The node type in the AST
E - The expression type
T - The type type
B - The binding type
TB - The type binding type
S - The scope type (optional)
I - The type used to represent identifiers
QI - The type used to represent qualified identifiers
R - The sub-type of related expression to use
A - The sub-type of AST-based anaphora to use
All Implemented Interfaces:
PreparatoryTransformation<N,​E,​T,​B,​TB,​S,​I,​QI,​R,​A>, Strategy

public class NoPreparationRequired<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>>
extends AbstractPreparatoryTransformation<N,​E,​T,​B,​TB,​S,​I,​QI,​R,​A>
A no-operation preparatory transformation that merely returns a given ASTBasedAnaphora relation.
  • Constructor Details

  • Method Details

    • getKind

      public String getKind()
      Description copied from interface: Strategy
      Returns a short mnemonic string that uniquely identifies this strategy among the type of strategies it belongs to.
      Returns:
      the kind of strategy
    • canPerform

      public CheckResult<N,​E,​S> canPerform​(Chunk<N> chunk, E definiteExpression, S scope)
      Description copied from interface: PreparatoryTransformation
      Check whether the transformation can be performed.

      Note that the applicability of preparatory transformations must be mutually exclusive: only one out of all preparatory transformations can be applicable to a combination of chunk, definite expression and scope.

      Parameters:
      chunk - The chunk that contains the node that may function as related expression.
      definiteExpression - The definite expression that can potentially function as anaphor.
      scope - The scope containing the definite expression. May be null if not required by the AST implementation configured via the service provider interfaces.
      Returns:
      the result of a check that might contain (hidden) implementation-specific cached information to speed up PreparatoryTransformation.perform(CheckResult, ASTBasedAnaphora).
    • perform

      public A perform​(CheckResult<N,​E,​S> result, A preliminaryAnaphora)
      Description copied from interface: PreparatoryTransformation
      Perform the preparatory transformation and return a potential Anaphora relation thereafter.
      Parameters:
      result - the result of an invocation of check that might contain (hidden) implementation-specific cached information to speed up PreparatoryTransformation.perform(CheckResult, ASTBasedAnaphora)
      preliminaryAnaphora - a preliminary anaphora relation that will be used as a blue-print to create the potential anaphora. (The preliminary anaphora is based on the AST before the preparatory transformation - its related expression might be unreachable from its the definite expression.)
      Returns:
      a potential anaphora relation that in valid in the AST after the preparatory transformation has been applied.