Class ClassifierTemplateParameter
A ClassifierTemplateParameter exposes a Classifier as a formal template parameter. <p>From package UML::Classification.</p>
[XmlNamespace("http://www.eclipse.org/uml2/5.0.0/UML")]
[XmlNamespacePrefix("uml")]
[ModelRepresentationClass("http://www.eclipse.org/uml2/5.0.0/UML#//ClassifierTemplateParameter")]
public class ClassifierTemplateParameter : TemplateParameter, IClassifierTemplateParameter, ITemplateParameter, IElement, IEModelElement, IModelElement, INotifyPropertyChanged, INotifyPropertyChanging
- Inheritance
-
ClassifierTemplateParameter
- Implements
- Inherited Members
Constructors
ClassifierTemplateParameter()
Creates a new instance
public ClassifierTemplateParameter()
Properties
AllowSubstitutable
Constrains the required relationship between an actual parameter and the parameteredElement for this formal parameter. <p>From package UML::Classification.</p>
[TypeConverter(typeof(LowercaseBooleanConverter))]
[XmlElementName("allowSubstitutable")]
[XmlAttribute(true)]
public bool AllowSubstitutable { get; set; }
Property Value
ClassInstance
Gets the Class model for this type
public static IClass ClassInstance { get; }
Property Value
ConstrainingClassifier
The classifiers that constrain the argument that can be used for the parameter. If the allowSubstitutable attribute is true, then any Classifier that is compatible with this constraining Classifier can be substituted; otherwise, it must be either this Classifier or one of its specializations. If this property is empty, there are no constraints on the Classifier that can be used as an argument. <p>From package UML::Classification.</p>
[XmlElementName("constrainingClassifier")]
[XmlAttribute(true)]
public ISetExpression<IClassifier> ConstrainingClassifier { get; }
Property Value
ReferencedElements
Gets the referenced model elements of this model element
public override IEnumerableExpression<IModelElement> ReferencedElements { get; }
Property Value
Methods
Actual_is_classifier(object, object)
The argument to a ClassifierTemplateParameter is a Classifier. templateParameterSubstitution.actual->forAll(a | a.oclIsKindOf(Classifier))
public bool Actual_is_classifier(object diagnostics, object context)
Parameters
diagnostics
objectThe chain of diagnostics to which problems are to be appended.
context
objectThe cache of context-specific information.
Returns
Constraining_classifiers_constrain_args(object, object)
If there are any constrainingClassifiers, then every argument must be the same as or a specialization of them, or if allowSubstitutable is true, then it can also be substitutable.
templateParameterSubstitution.actual->forAll( a |
let arg : Classifier = a.oclAsType(Classifier) in
constrainingClassifier->forAll(
cc |
arg = cc or arg.conformsTo(cc) or (allowSubstitutable and arg.isSubstitutableFor(cc))
)
)
public bool Constraining_classifiers_constrain_args(object diagnostics, object context)
Parameters
diagnostics
objectThe chain of diagnostics to which problems are to be appended.
context
objectThe cache of context-specific information.
Returns
Constraining_classifiers_constrain_parametered_element(object, object)
If there are any constrainingClassifiers, then the parameteredElement must be the same as or a specialization of them, or if allowSubstitutable is true, then it can also be substitutable. constrainingClassifier->forAll( cc | parameteredElement = cc or parameteredElement.conformsTo(cc) or (allowSubstitutable and parameteredElement.isSubstitutableFor(cc)) )
public bool Constraining_classifiers_constrain_parametered_element(object diagnostics, object context)
Parameters
diagnostics
objectThe chain of diagnostics to which problems are to be appended.
context
objectThe cache of context-specific information.
Returns
GetAttributeValue(string, int)
Resolves the given attribute name
protected override object GetAttributeValue(string attribute, int index)
Parameters
Returns
- object
The attribute value or null if it could not be found
GetClass()
Gets the Class for this model element
public override IClass GetClass()
Returns
GetCollectionForFeature(string)
Gets the Model element collection for the given feature
protected override IList GetCollectionForFeature(string feature)
Parameters
feature
stringThe requested feature
Returns
- IList
A non-generic list of elements
GetExpressionForAttribute(string)
Gets the property expression for the given attribute
protected override INotifyExpression<object> GetExpressionForAttribute(string attribute)
Parameters
attribute
stringThe requested attribute in upper case
Returns
- INotifyExpression<object>
An incremental property expression
Has_constraining_classifier(object, object)
If allowSubstitutable is true, then there must be a constrainingClassifier. allowSubstitutable implies constrainingClassifier->notEmpty()
public bool Has_constraining_classifier(object diagnostics, object context)
Parameters
diagnostics
objectThe chain of diagnostics to which problems are to be appended.
context
objectThe cache of context-specific information.
Returns
Matching_abstract(object, object)
If the parameteredElement is not abstract, then the Classifier used as an argument shall not be abstract. (not parameteredElement.isAbstract) implies templateParameterSubstitution.actual->forAll(a | not a.oclAsType(Classifier).isAbstract)
public bool Matching_abstract(object diagnostics, object context)
Parameters
diagnostics
objectThe chain of diagnostics to which problems are to be appended.
context
objectThe cache of context-specific information.
Returns
Parametered_element_no_features(object, object)
The parameteredElement has no direct features, and if constrainedElement is empty it has no generalizations. parameteredElement.feature->isEmpty() and (constrainingClassifier->isEmpty() implies parameteredElement.allParents()->isEmpty())
public bool Parametered_element_no_features(object diagnostics, object context)
Parameters
diagnostics
objectThe chain of diagnostics to which problems are to be appended.
context
objectThe cache of context-specific information.
Returns
SetFeature(string, object)
Sets a value to the given feature
protected override void SetFeature(string feature, object value)