IDEA-172425 Add a javadoc why public class members are only accessible
authorVitaliy.Bibaev <vitaliy.bibaev@jetbrains.com>
Mon, 26 Mar 2018 16:59:01 +0000 (19:59 +0300)
committerVitaliy.Bibaev <vitaliy.bibaev@jetbrains.com>
Tue, 27 Mar 2018 09:11:27 +0000 (12:11 +0300)
java/java-impl/src/com/intellij/refactoring/extractMethodObject/reflect/PsiReflectionAccessUtil.java

index 8fe8efd10460fae2fb7e9c8e07c14cef59332d14..1519682bc574129d05f8637ea05063c9110bc87f 100644 (file)
@@ -17,6 +17,10 @@ class PsiReflectionAccessUtil {
     return classMember.hasModifierProperty(PsiModifier.PUBLIC) && isAccessible(classMember.getContainingClass());
   }
 
+  /**
+   * Since we use new classloader for each "Evaluate expression" with compilation, the generated code has no
+   * access to all members excluding public
+   */
   @Contract("null -> false")
   public static boolean isAccessible(@Nullable PsiClass psiClass) {
     if (psiClass == null) return false;