Bundt Scripting Reference · Bundt Scripting Language version 1.0.1.0

alter class statement

Alters an existing class in the context model. If no model is in context, an error occurs.

The altered class is put in context.

Syntax

alter class [ClassName] as
    [name Name]
    [( MarkerList )]
    [[ AspectList ]]
    [in Container | none]
    [definition Definition]
    [comments Comments]
    [tagged
      [without WithoutTagList]
      [with WithTagList]
    ]

Element Type Optionality Notes
ClassName Class name Optional. If no class name is specified, the class in context is used. If no class is in context, an error occurs. Specifies the existing class to be altered.
Name Expression<Identifier> or Expression<Dictionary<Identifier>> Optional. If no name is specified, the current one is maintained. Specifies the new name of the class, either as an identifier or in multilingual dictionary format.
MarkerList Marker list Optional. Specifies the markers to apply to the class. The only accepted marker is A for abstract, optionally prefixed by ! to negate it.
AspectList Marker list Optional. Specifies the model aspects implemented by the class. Accepted markers are S for subjective and T for temporal, optionally prefixed by ! to negate them.
Container Package name Optional. If no package name or "none" is specified, the current one is maintained. Specifies the package where to put the class.
none Optional. If this is specified, then Container cannot be specified. Specifies that the class is to be put outside any packages.
Definition Expression<Text> or Expression<Dictionary<Text>> Optional. If no definition is specified, the current one is maintained. Specifies the new definition of the class.
Comments Expression<Text> or Expression<Dictionary<Text>> Optional. If no commments are specified, the current ones are maintained. Specifies the new commments for the class.
WithoutTagList Element name list Optional. If no tags are specified, no tags are removed. Specifies the tags to remove from the class.
WithTagList Element name list Optional. If no tags are specified, no tags are added. Specifies the tags to add to the class.

Returns

The class just altered.

Examples

Intent Code
Alter a class to change its name and make it non-abstract alter class Person as name Individual (!A);
Alter the context class to make it the temporal aspect alter class as [T];
Alter a class to put it in a different package alter class Person as in Org.Staff;

See Also


Contents distributed under a Creative Commons Attribution 4.0 International License · About · Terms of Use · Contact Us · last updated on 08 October 2020