Class TypeRecurrence<N,E,TB,S,I,QI,EV,PP>
java.lang.Object
de.monochromata.AbstractStrategy
de.monochromata.anaphors.ast.reference.strategy.AbstractReferentializationStrategy<N,E,TB,S,I,QI,EV,PP>
de.monochromata.anaphors.ast.reference.strategy.concept.AbstractConceptReferentializationStrategy<N,E,TB,S,I,QI,EV,PP>
de.monochromata.anaphors.ast.reference.strategy.concept.TypeRecurrence<N,E,TB,S,I,QI,EV,PP>
- Type Parameters:
N- The node type in the ASTE- The expression 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 perspectivations
- All Implemented Interfaces:
ConceptReferentializationStrategy<E,TB,S,I,QI>,ReferentializationStrategy<E,TB,S,I,QI>,Strategy
- Direct Known Subclasses:
CaseSensitiveTypeRecurrence
public class TypeRecurrence<N,E,TB,S,I,QI,EV,PP> extends AbstractConceptReferentializationStrategy<N,E,TB,S,I,QI,EV,PP>
Referentialization based on case-insensitive exact type recurrence.
-
Field Summary
Fields inherited from class de.monochromata.anaphors.ast.reference.strategy.AbstractReferentializationStrategy
anaphorsSpi -
Constructor Summary
Constructors Modifier Constructor Description protectedTypeRecurrence()Used in contract testing.TypeRecurrence(AnaphorsSpi<N,E,TB,S,I,QI,EV,PP> anaphorsSpi) -
Method Summary
Modifier and Type Method Description booleancanReferTo(I idFromDefiniteExpression, Referent<TB,S,I,QI> potentialReferent, S scope)Returns true, if the given definite expression is a simple name, and the simple name is equal to the simple name of the type of the referent.booleancanReferToUsingConceptualType(I idFromDefiniteExpression, Referent<TB,S,I,QI> potentialReferent, S scope)Returns true, if the given definite expression is a simple name, and the conceptual type expressed in simple name is equal to the simple name of the type of the referent.FeatureContainer<QI>getFeaturesRemainingInIdentifierIfItCanReferUsingConceptualType(I idFromDefiniteExpression, Referent<TB,S,I,QI> potentialReferent, S scope)IfConceptReferentializationStrategy.canReferToUsingConceptualType(Object, Referent, Object)returnstruefor the given arguments, there is a suffix in the given definite expression that represents a conceptual type and can be used to refer to the given potential referent.StringgetKind()Returns a short mnemonic string that uniquely identifies this strategy among the type of strategies it belongs to.protected booleanisCaseSensitive()Whether or not type names are matched in a case-sensitive way.Methods inherited from class de.monochromata.AbstractStrategy
equals, hashCode, toString
-
Field Details
-
Rt_KIND
- See Also:
- Constant Field Values
-
-
Constructor Details
-
TypeRecurrence
protected TypeRecurrence()Used in contract testing. -
TypeRecurrence
-
-
Method Details
-
canReferTo
public boolean canReferTo(I idFromDefiniteExpression, Referent<TB,S,I,QI> potentialReferent, S scope)Returns true, if the given definite expression is a simple name, and the simple name is equal to the simple name of the type of the referent.- Parameters:
idFromDefiniteExpression- the ID from the definite expression that shall refer to the given potential referentpotentialReferent- the potential referent of the definite expressionscope- the scope in which the definite expression occurs- Returns:
true, if the definite expression is a simple name that is equal to the simple name of the type of the referent,falseotherwise.- See Also:
isCaseSensitive(),canReferToUsingConceptualType(Object, Referent, Object)
-
canReferToUsingConceptualType
public boolean canReferToUsingConceptualType(I idFromDefiniteExpression, Referent<TB,S,I,QI> potentialReferent, S scope)Returns true, if the given definite expression is a simple name, and the conceptual type expressed in simple name is equal to the simple name of the type of the referent.- Parameters:
idFromDefiniteExpression- the ID from the definite expression that shall referpotentialReferent- the potential referent of the definite expressionscope- the scope in which the definite expression occurs- Returns:
true, if the definite expression is a simple name that is equal to the simple name of the type of the referent,falseotherwise.- See Also:
isCaseSensitive(),canReferTo(Object, Referent, Object)
-
getFeaturesRemainingInIdentifierIfItCanReferUsingConceptualType
public FeatureContainer<QI> getFeaturesRemainingInIdentifierIfItCanReferUsingConceptualType(I idFromDefiniteExpression, Referent<TB,S,I,QI> potentialReferent, S scope)Description copied from interface:ConceptReferentializationStrategyIfConceptReferentializationStrategy.canReferToUsingConceptualType(Object, Referent, Object)returnstruefor the given arguments, there is a suffix in the given definite expression that represents a conceptual type and can be used to refer to the given potential referent. In this case, this method returns aFeatureContainerwith all features that can be extracted from the remainder of the given definite expression after the suffix has been removed. If the remainder is empty, theFeatureContaineris empty, too.- Parameters:
idFromDefiniteExpression- The ID from the definite expression whose features are to be extracted.potentialReferent- The potential referent of the definite expression.scope- An optional scope object specific to the AST implementation.- Returns:
null, ifConceptReferentializationStrategy.canReferToUsingConceptualType(Object, Referent, Object)returns false, a (possibly) emptyFeatureContainerifConceptReferentializationStrategy.canReferToUsingConceptualType(Object, Referent, Object)returns true.- See Also:
FeatureReferentializationStrategy
-
isCaseSensitive
Whether or not type names are matched in a case-sensitive way.- Returns:
- false
-
getKind
Description copied from interface:StrategyReturns a short mnemonic string that uniquely identifies this strategy among the type of strategies it belongs to.- Returns:
- the kind of strategy
-