PsiElement element = ...; Class elementClass = element.getClass(); System.out.println("Element class: " + elementClass.getName());
PsiElement element = ...; if (element.getClass() == PsiMethodCallExpression.class) { PsiMethodCallExpression callExpression = (PsiMethodCallExpression) element; // do something with the method call expression }This example checks if a PSI element is a `PsiMethodCallExpression` and performs some action if it is. Package library: The `com.intellij.psi` package is part of the IntelliJ Platform SDK, which is used to develop plugins for IntelliJ IDEA and other JetBrains IDEs. This package provides a Java API for accessing and manipulating PSI elements, which are the building blocks of the IntelliJ IDEA's code analysis and refactorings.