Class IA2FStrategy.IA2FReferent<N,​E,​T,​B,​VB extends B,​FB extends 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>>

java.lang.Object
de.monochromata.anaphors.ast.feature.DefaultFeatureContainer<QI>
de.monochromata.anaphors.ast.reference.AbstractReferent<N,​E,​T,​B,​VB,​FB,​MB,​TB,​S,​I,​QI,​R,​A>
de.monochromata.anaphors.ast.strategy.IA2FStrategy.IA2FReferent<N,​E,​T,​B,​VB,​FB,​MB,​TB,​S,​I,​QI,​EV,​PP,​R,​A>
All Implemented Interfaces:
FeatureContainer<QI>, Referent<TB,​S,​I,​QI>
Enclosing class:
IA2FStrategy<N,​E,​T,​B,​VB extends B,​FB extends 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>>

public static class IA2FStrategy.IA2FReferent<N,​E,​T,​B,​VB extends B,​FB extends 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>>
extends AbstractReferent<N,​E,​T,​B,​VB,​FB,​MB,​TB,​S,​I,​QI,​R,​A>
  • Constructor Details

    • IA2FReferent

      protected IA2FReferent()
      Used in contract testing.
  • Method Details

    • getFieldBinding

      public FB getFieldBinding()
    • canBeUsedInsteadOf

      public boolean canBeUsedInsteadOf​(Referent<TB,​S,​I,​QI> other)
      Description copied from interface: Referent
      Used to resolve ambiguity between referents. Cases of resolvable ambiguity include e.g. a referent that represents the invocation of a getter method that returns the value of the field that is represented by another referent.
      Parameters:
      other - Another referent.
      Returns:
      True, if this referent represents the same referent as other and this related expression should be used instead of other in order to eliminate the ambiguity between the two. False is returned otherwise.
    • hasName

      public boolean hasName()
    • getName

      public QI getName()
      Description copied from interface: Referent
      Returns the name of this referent. If Referent.hasMethodName() returns true and the method name is the only name of this referent, this method returns a name constructed from the method name. That name is constructed by removing any getter or setter prefix to the method name and by turning the first character of the remaining string into lower case.
      Returns:
      The name of this referent.
    • hasMethodName

      public boolean hasMethodName()
      Description copied from interface: Referent
      Returns true, if this referent is created by a method invocation. TODO: Maybe replace by a system of thematic roles
      Returns:
      True, if the referent is created by a method invocation, false otherwise.
      See Also:
      Referent.getMethodName()
    • getMethodName

      public I getMethodName()
      Description copied from interface: Referent
      Returns the name of the method invocation which creates this referent, if Referent.hasMethodName() returns true. TODO: Maybe replace by a system of thematic roles
      Returns:
      The method name.
    • resolveType

      public TB resolveType​(S scope)
      Description copied from interface: Referent
      The type of the referent - is identical to the return type, if the referent is a method.
      Parameters:
      scope - The scope containing the referent if used by the compiler-specific implementation. Implementations of this method must not access the scope but merely pass it on to SPI's they invoke.
      Returns:
      The type binding of the referent.
    • getMemento

      public Object getMemento()
      Description copied from interface: Referent
      Return an object whose Object.toString() method returns a representation of the internal state of the referent that can be passed to AnaphorResolutionStrategy.createReferent(Object, de.monochromata.anaphors.ast.relatedexp.RelatedExpression, Object) TODO: Use RelatedExpressionsSpi methods to convert the memento to a String and back, or create a ReferentSpi.
      Returns:
      A memento object.
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class AbstractReferent<N,​E,​T,​B,​VB extends B,​FB extends B,​MB extends 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>>
    • equals

      public boolean equals​(Object obj)
      Overrides:
      equals in class AbstractReferent<N,​E,​T,​B,​VB extends B,​FB extends B,​MB extends 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>>
    • toString

      public String toString()
      Overrides:
      toString in class AbstractReferent<N,​E,​T,​B,​VB extends B,​FB extends B,​MB extends 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>>