Matches the Java 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 |
isImplicit |
bool |
true if the new operator is implicitly placed
|
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 Example:
pattern exampleNew {
newOperator {
.objectType == classType { .simpleName == "Example" }
}
};