ValueMarkup (@NotNull XValue value) { Class<V> valueClass = myProvider.getValueClass(); if (!valueClass.isInstance(value)) return null; V v = valueClass.cast(value); if (!myProvider.canMark(v)) return null; M m = myProvider.getMarker(v); if (m == null) return null; return myMarkers.get(m); }