List<IElementType> (@NotNull IElementType type) { List<IElementType> result = null; for (BracePair pair : myMatcher.getPairs()) { IElementType match = null; if (type == pair.getRightBraceType()) match = pair.getLeftBraceType(); if (type == pair.getLeftBraceType()) match = pair.getRightBraceType(); if (match != null) { if (result == null) result = new ArrayList<>(2); result.add(match); } } return result != null ? result : Collections.emptyList(); }