List<MatchPredicate> (@NotNull MatchVariableConstraint constraint, @NotNull String name, @NotNull MatchOptions options) { final List<MatchPredicate> result = new SmartList<>(); if (!StringUtil.isEmptyOrSpaces(constraint.getNameOfExprType())) { final MatchPredicate predicate = new ExprTypePredicate( constraint.isRegexExprType() ? constraint.getNameOfExprType() : constraint.getExpressionTypes(), name, constraint.isExprTypeWithinHierarchy(), options.isCaseSensitiveMatch(), constraint.isPartOfSearchResults(), constraint.isRegexExprType() ); result.add(constraint.isInvertExprType() ? new NotPredicate(predicate) : predicate); } if (!StringUtil.isEmptyOrSpaces(constraint.getNameOfFormalArgType())) { final MatchPredicate predicate = new FormalArgTypePredicate( constraint.isRegexFormalType() ? constraint.getNameOfFormalArgType() : constraint.getExpectedTypes(), name, constraint.isFormalArgTypeWithinHierarchy(), options.isCaseSensitiveMatch(), constraint.isPartOfSearchResults(), constraint.isRegexFormalType() ); result.add(constraint.isInvertFormalType() ? new NotPredicate(predicate) : predicate); } return result; }