Matches the new operator.
This pattern only matches nodes of type expression.
Properties
newOperator produces a record that contains the following properties:
| Name | Type | Description |
|---|---|---|
initializer |
initializer |
The expression evaluated to determine the initial condition |
objectType |
type |
The type of the object being created |
Inherits properties from:
Example
The following CodeXM pattern matches all new operations that create an object of type struct Example:
pattern exampleNew {
newOperator {
.objectType == classType { .simpleName == "Example" }
}
};