Validates that the given parameter is of the correct type.
Note on strict type matching:
The constructor takes a parameter {@code strictType}. If {@code strictType} is {@code false}, nodes being validated do not need to precisely match the type(s) passed to the constructor; rather a limited set of value conversions will be attempted, and if the node value can be converted, the node is considered to match the required type. The conversions are:
- For BIG_DECIMAL, BIG_INTEGER, DOUBLE, INT, LONG and PROPERTY, the related ModelNode.asXXX() method is invoked; if no exception is thrown the type is considered to match.
- For BOOLEAN, if the node is of type BOOLEAN it is considered to match. If it is of type STRING with a value ignoring case of "true" or "false" it is considered to match.
- For OBJECT, if the node is of type OBJECT or PROPERTY it is considered to match. If it is of type LIST and each element in the list is of type PROPERTY it is considered to match.
- For STRING, if the node is of type STRING, BIG_DECIMAL, BIG_INTEGER, DOUBLE, INT or LONG it is considered to match.
For all other types, an exact match is required.
@author Brian Stansberry (c) 2011 Red Hat Inc.