private boolean isValidationMatcherExpression ( Node node ) { switch ( node . getNodeType ( ) ) { case Node . ELEMENT_NODE : return node . getFirstChild ( ) != null && StringUtils . hasText ( node . getFirstChild ( ) . getNodeValue ( ) ) && ValidationMatcherUtils . isValidationMatcherExpression ( node . getFirstChild ( ) . getNodeValue ( ) . trim ( ) ) ; case Node . ATTRIBUTE_NODE : return StringUtils . hasText ( node . getNodeValue ( ) ) && ValidationMatcherUtils . isValidationMatcherExpression ( node . getNodeValue ( ) . trim ( ) ) ; default : return false ; //validation matchers makes no sense } }
Checks whether the given node contains a validation matcher