Class Meta2ClassesTransformation.RefinedReferenceCollectionClassGenerator
The transformation rule that generates the collection class for a refined reference
public class Meta2ClassesTransformation.RefinedReferenceCollectionClassGenerator : TransformationRule<IClass, IReference, CodeTypeDeclaration>
- Inheritance
-
Meta2ClassesTransformation.RefinedReferenceCollectionClassGenerator
- Inherited Members
Methods
CreateOutput(IClass, IReference, ITransformationContext)
Creates the uninitialized output type declaration
public override CodeTypeDeclaration CreateOutput(IClass scope, IReference reference, ITransformationContext context)
Parameters
scope
IClassThe scope in which the reference is refined
reference
IReferenceThe refined reference
context
ITransformationContextThe transformation context
Returns
- CodeTypeDeclaration
The newly created code type declaration
ImplementCollection(CodeTypeDeclaration, CodeTypeReference, CodeExpression, IReference, List<IReference>, List<IModelElement>, ITransformationContext)
Implements the ICollection interface
protected virtual void ImplementCollection(CodeTypeDeclaration generatedType, CodeTypeReference elementType, CodeExpression standardValuesRef, IReference original, List<IReference> implementingReferences, List<IModelElement> constraintReferences, ITransformationContext context)
Parameters
generatedType
CodeTypeDeclarationThe generated code type declaration
elementType
CodeTypeReferenceThe element type reference
standardValuesRef
CodeExpressionA reference to the standard values field
original
IReferenceThe original reference
implementingReferences
List<IReference>The references implementing the collection
constraintReferences
List<IModelElement>The constraints that apply to the reference
context
ITransformationContextThe context in which the collection is implemented
ImplementList(CodeTypeDeclaration, CodeTypeReference, CodeExpression, IReference, List<IReference>, List<IModelElement>, ITransformationContext)
Implements the IList interface
protected virtual void ImplementList(CodeTypeDeclaration generatedType, CodeTypeReference elementType, CodeExpression standardValuesRef, IReference original, List<IReference> implementingReferences, List<IModelElement> constraintReferences, ITransformationContext context)
Parameters
generatedType
CodeTypeDeclarationThe generated code type declaration
elementType
CodeTypeReferenceThe element tyoe reference
standardValuesRef
CodeExpressionA reference to the standard values field
original
IReferenceThe original reference
implementingReferences
List<IReference>The attributes implementing the collection
constraintReferences
List<IModelElement>The constraints that apply to the reference
context
ITransformationContextThe context in which the collection is implemented
ImplementNotifiable(CodeTypeDeclaration, CodeTypeReference)
Implement the IEnumerableExpression interface
protected virtual void ImplementNotifiable(CodeTypeDeclaration generatedType, CodeTypeReference elementType)
Parameters
generatedType
CodeTypeDeclarationThe generated code type declaration
elementType
CodeTypeReferenceThe element type reference
ImplementNotifications(CodeTypeDeclaration, List<IReference>, CodeConstructor, CodeArgumentReferenceExpression, ITransformationContext)
Implement notifications for the given refined reference class
protected virtual void ImplementNotifications(CodeTypeDeclaration generatedType, List<IReference> implementingReferences, CodeConstructor constructor, CodeArgumentReferenceExpression constrParentRef, ITransformationContext context)
Parameters
generatedType
CodeTypeDeclarationThe generated type
implementingReferences
List<IReference>The implementing references
constructor
CodeConstructorThe constructor of the generated type
constrParentRef
CodeArgumentReferenceExpressionThe reference to the parent element
context
ITransformationContextThe context in which the request was made
Transform(IClass, IReference, CodeTypeDeclaration, ITransformationContext)
Initializes the created type declaration
public override void Transform(IClass scope, IReference reference, CodeTypeDeclaration generatedType, ITransformationContext context)
Parameters
scope
IClassThe scope in which the reference is refined
reference
IReferenceThe refined reference
generatedType
CodeTypeDeclarationThe generated type declaration
context
ITransformationContextThe transformation context