You use the General page of the New
Pattern Parameter window, to add a parameter to a pattern.
- Name
- Identifies the name of the parameter for the pattern applier. It is used
to create the pattern's Java™ class and other files that support
the pattern. You can change the default name to provide a name that is more
descriptive of the parameter's purpose in the pattern.
- Class Name
- Identifies the Java class for the parameter. A default
name is created based on the parameter name with the following character exceptions:
spaces and special characters are deleted and the initial character is capitalized.
Accept the default name or create a new one.
- Short Description
- Explains the purpose of the parameter. You can include a prompt to guide
the user to specify appropriate arguments for this parameter. This description
is visible on the Short Description page of the Pattern
Explorer view in addition to the help files, if they are generated
for the pattern. The text also appears as a hover help on the diagram view
when the user hovers over the parameter in the pattern instance.
- Type
- Specifies a UML 2.0 type for the parameter.
- Allowable Subtypes
- When available, indicates that the UML 2.0 type specified above is actually
a collection of types. Select one or more subtypes to limit the argument types
that the applier can choose for this parameter when applying the pattern.
For example, there are 31 subtypes for a type selection of classifier that
includes activity, node, state machine, stereotype, class, actor, and interface.
If you do not specify a subtype in this field, all possible subtypes are available
to the applier. Specifying all of the subtypes makes all possible subtypes
available to the applier and displays the icon for each on the diagram view.
Note: Indicating
an argument value using text entry for the types that have subtypes always
sets this field to the default subtype.
- Allow text entry of argument value
- When selected, allows the pattern applier to specify an argument by typing
the name of a new or existing element. Subtypes are disregarded when an argument
is added using text entry because only the default subtype can be specified.
For example, an interface is the default subtype for classifier so all text
entries for classifier create a new interface or specify an existing interface.
- Multiplicity
- Indicates the allowed value or range of argument values that
can be specified for the template parameter during pattern application.