All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.netbeans.spi.java.queries.AccessibilityQueryImplementation Maven / Gradle / Ivy

/*
 * Licensed to the Apache Software Foundation (ASF) under one
 * or more contributor license agreements.  See the NOTICE file
 * distributed with this work for additional information
 * regarding copyright ownership.  The ASF licenses this file
 * to you under the Apache License, Version 2.0 (the
 * "License"); you may not use this file except in compliance
 * with the License.  You may obtain a copy of the License at
 *
 *   http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing,
 * software distributed under the License is distributed on an
 * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
 * KIND, either express or implied.  See the License for the
 * specific language governing permissions and limitations
 * under the License.
 */
package org.netbeans.spi.java.queries;

import org.netbeans.api.annotations.common.CheckForNull;
import org.netbeans.api.annotations.common.NonNull;
import org.openide.filesystems.FileObject;

/**
 * Permits providers to mark certain Java packages as being inaccessible to
 * outside code despite possibly containing public classes.
 * 

* A default implementation is registered by the * org.netbeans.modules.java.project module which looks up the * project corresponding to the file (if any) and checks whether that * project has an implementation of this interface in its lookup. If so, it * delegates to that implementation. Therefore it is not generally necessary * for a project type provider to register its own global implementation of * this query, if it depends on the Java Project module and uses this style. *

* @see org.netbeans.api.java.queries.AccessibilityQuery * @see FileOwnerQuery * @see Project#getLookup * @author Jesse Glick * @since org.netbeans.api.java/1 1.4 */ public interface AccessibilityQueryImplementation { /** * Checks whether a given Java package (folder of source files) * is intended to be publicly accessed by code residing in other * compilation units. * @param pkg a Java source package * @return true if it is definitely intended for public access, false if it * is definitely not, or null if nothing is known about it */ public @CheckForNull Boolean isPubliclyAccessible(@NonNull FileObject pkg); }




© 2015 - 2025 Weber Informatics LLC | Privacy Policy