org.netbeans.api.java/1 1.10.22

org.netbeans.api.java.queries
Class AccessibilityQuery

java.lang.Object
  extended by org.netbeans.api.java.queries.AccessibilityQuery

public class AccessibilityQuery
extends Object

Indicates whether a Java package should be considered publicly accessible.

Suggested uses:

  1. Visually marking public and private packages as such.
  2. Editor code completion could refuse to include private packages from other compilation units.
  3. Javadoc editing tools (the suggestions provider and/or AutoComment) could treat missing or incomplete Javadoc in private packages as a minor error, or not an error.

If the Java Project module is enabled, you may register an implementation to the lookup for a project rather than the default lookup.

Since:
org.netbeans.api.java/1 1.4
See Also:
AccessibilityQueryImplementation

Method Summary
static Boolean isPubliclyAccessible(FileObject pkg)
          Check whether a given Java source package should be considered publicly accessible for use by other compilation units.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

isPubliclyAccessible

public static Boolean isPubliclyAccessible(FileObject pkg)
Check whether a given Java source package should be considered publicly accessible for use by other compilation units. If not, then even public classes in the package should be treated as effectively private by the IDE (though the Java compiler will not forbid you to access them).

Parameters:
pkg - a Java source package (must have a corresponding ClassPath.SOURCE root)
Returns:
true if the package is definitely intended for public access from other compilation units, false if it is definitely not, or null if this information is not known

org.netbeans.api.java/1 1.10.22

Built on July 11 2007.  |  Portions Copyright 1997-2005 Sun Microsystems, Inc. All rights reserved.