edu.mit.ai.psg.jevaES
Class AccessibilityMethods

java.lang.Object
  |
  +--edu.mit.ai.psg.jevaES.AccessibilityMethods

public class AccessibilityMethods
extends Object

AccessibilityMethods --- methods for checking whether IllegalAccessException should be thrown. [JavaLangSpec1.0sec6.6]


Method Summary
static boolean isAccessibleFromPackage(Class memberClass, String packageName)
          Check whether class is accessible from package, If nested, its enclosing class must also be accessible.
static boolean isAccessibleFromPackage(Member member, String packageName)
          Check whether member (field, method, constructor) is accessible from package, i.e., an unrelated class in package packageName.
static boolean isPublicToTopLevel(Class aClassOrInterface)
          return true if aClassOrInterface and and all its enclosing classes or interfaces are public
static boolean isPublicToTopLevel(Member member)
          return true if member is public and its declaring class is public to top level (all enclosing classes or interfaces are public)
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

isPublicToTopLevel

public static boolean isPublicToTopLevel(Class aClassOrInterface)
return true if aClassOrInterface and and all its enclosing classes or interfaces are public

isPublicToTopLevel

public static boolean isPublicToTopLevel(Member member)
return true if member is public and its declaring class is public to top level (all enclosing classes or interfaces are public)

isAccessibleFromPackage

public static boolean isAccessibleFromPackage(Member member,
                                              String packageName)
Check whether member (field, method, constructor) is accessible from package, i.e., an unrelated class in package packageName. Its declaring class must also be accessible.

isAccessibleFromPackage

public static boolean isAccessibleFromPackage(Class memberClass,
                                              String packageName)
Check whether class is accessible from package, If nested, its enclosing class must also be accessible.

Copyright (c) 1996-1999
Massachusetts Institute of Technology

Feedback: jeva-feedback@ai.mit.edu