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
scopeIClassThe scope in which the reference is refined
referenceIReferenceThe refined reference
contextITransformationContextThe 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
generatedTypeCodeTypeDeclarationThe generated code type declaration
elementTypeCodeTypeReferenceThe element type reference
standardValuesRefCodeExpressionA reference to the standard values field
originalIReferenceThe original reference
implementingReferencesList<IReference>The references implementing the collection
constraintReferencesList<IModelElement>The constraints that apply to the reference
contextITransformationContextThe 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
generatedTypeCodeTypeDeclarationThe generated code type declaration
elementTypeCodeTypeReferenceThe element tyoe reference
standardValuesRefCodeExpressionA reference to the standard values field
originalIReferenceThe original reference
implementingReferencesList<IReference>The attributes implementing the collection
constraintReferencesList<IModelElement>The constraints that apply to the reference
contextITransformationContextThe context in which the collection is implemented
ImplementNotifiable(CodeTypeDeclaration, CodeTypeReference)
Implement the IEnumerableExpression interface
protected virtual void ImplementNotifiable(CodeTypeDeclaration generatedType, CodeTypeReference elementType)
Parameters
generatedTypeCodeTypeDeclarationThe generated code type declaration
elementTypeCodeTypeReferenceThe 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
generatedTypeCodeTypeDeclarationThe generated type
implementingReferencesList<IReference>The implementing references
constructorCodeConstructorThe constructor of the generated type
constrParentRefCodeArgumentReferenceExpressionThe reference to the parent element
contextITransformationContextThe 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
scopeIClassThe scope in which the reference is refined
referenceIReferenceThe refined reference
generatedTypeCodeTypeDeclarationThe generated type declaration
contextITransformationContextThe transformation context