MixinInfo (final GrStatement statement) { if (!(statement instanceof GrMethodCall)) return null; return CachedValuesManager.getCachedValue(statement, () -> { GrMethodCall call = (GrMethodCall)statement; Pair<PsiClassType, GrReferenceExpression> original = getTypeToMixIn(call); if (original == null) return CachedValueProvider.Result.create(null, PsiModificationTracker.MODIFICATION_COUNT); PsiClass mix = getTypeToMix(call); if (mix == null) return CachedValueProvider.Result.create(null, PsiModificationTracker.MODIFICATION_COUNT); return CachedValueProvider.Result .create(new MixinInfo(original.first, original.second, mix), PsiModificationTracker.MODIFICATION_COUNT); }); }