src/jdk.compiler/share/classes/com/sun/tools/javac/code/Symbol.java
changeset 48945 6e6c777a37a2
parent 48683 b2f2bdba0472
child 49197 cc2673fa8c20
--- a/src/jdk.compiler/share/classes/com/sun/tools/javac/code/Symbol.java	Fri Feb 23 16:00:44 2018 -0500
+++ b/src/jdk.compiler/share/classes/com/sun/tools/javac/code/Symbol.java	Fri Feb 23 13:42:04 2018 -0800
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1999, 2017, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1999, 2018, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -568,14 +568,14 @@
         return hiddenSym;
     }
 
-    /** Is this symbol inherited into a given class?
+    /** Is this symbol accessible in a given class?
      *  PRE: If symbol's owner is a interface,
      *       it is already assumed that the interface is a superinterface
-     *       of given class.
+     *       the given class.
      *  @param clazz  The class for which we want to establish membership.
      *                This must be a subclass of the member's owner.
      */
-    public boolean isInheritedIn(Symbol clazz, Types types) {
+    public final boolean isAccessibleIn(Symbol clazz, Types types) {
         switch ((int)(flags_field & Flags.AccessFlags)) {
         default: // error recovery
         case PUBLIC:
@@ -603,6 +603,17 @@
         }
     }
 
+    /** Is this symbol inherited into a given class?
+     *  PRE: If symbol's owner is a interface,
+     *       it is already assumed that the interface is a superinterface
+     *       of the given class.
+     *  @param clazz  The class for which we want to establish membership.
+     *                This must be a subclass of the member's owner.
+     */
+    public boolean isInheritedIn(Symbol clazz, Types types) {
+        return isAccessibleIn(clazz, types);
+    }
+
     /** The (variable or method) symbol seen as a member of given
      *  class type`site' (this might change the symbol's type).
      *  This is used exclusively for producing diagnostics.