mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-03-22 15:19:59 +07:00
[microservices] IDEA-353802 Added documentation
GitOrigin-RevId: 2562ba8b8d80860dc0718edff65f20e9766b1ae7
This commit is contained in:
committed by
intellij-monorepo-bot
parent
fe51586332
commit
24900db474
@@ -50,11 +50,19 @@ public interface JavaMainMethodProvider extends PossiblyDumbAware {
|
||||
@Contract(pure = true)
|
||||
@Nullable PsiMethod findMainInClass(@NotNull PsiClass clazz);
|
||||
|
||||
/**
|
||||
* @param clazz class to check
|
||||
* @return a pretty class name. e.x. for Kotlin it allows to return `MyClass` instead of `MyClass.Companion`
|
||||
*/
|
||||
@Contract(pure = true)
|
||||
default @Nullable String getMainClassName(@NotNull PsiClass clazz) {
|
||||
return ClassUtil.getJVMClassName(clazz);
|
||||
}
|
||||
|
||||
/**
|
||||
* @param psiElement element to check
|
||||
* @return true if the given element or its parent is the main method, false otherwise
|
||||
*/
|
||||
@Contract(pure = true)
|
||||
default boolean isMain(@NotNull PsiElement psiElement) {
|
||||
PsiMethod psiMethod = PsiTreeUtil.getParentOfType(psiElement, PsiMethod.class);
|
||||
|
||||
Reference in New Issue
Block a user