站内搜索: 请输入搜索关键词
当前页面: 在线文档首页 > NetBeans API Javadoc 5.0.0

AccessibilityQuery (NetBeans Java Support APIs) - NetBeans API Javadoc 5.0.0

 

org.netbeans.api.java.queries
Class AccessibilityQuery

java.lang.Object
  extended byorg.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

 

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