I see, so essentially I would find any method call expression and check if the class the method is being called is an instance of MiniMessage?
EDIT: I’ve been searching for a while now and can’t find a way to get the instance of class in in method call, I can get the super class (ComponentSerializer).
Update, I found a solution using PsiReferenceExpression.getQualifierExpression().getType() which returns PsiType containing all data you need, e.g. PsiType.getCanonicalText() which returns in my case net.kyori.adventure.text.minimessage.MiniMessage.
I combined this with PsiMethodCallExpression.resolveMethod().getName() to match the name with methods I wish to inject into.