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

com.thoughtworks.qdox.model.JavaPackage Maven / Gradle / Ivy

There is a newer version: 1.2.2.1-jre17
Show newest version
package com.thoughtworks.qdox.model;

/*
 * 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.
 */

import java.util.Collection;

import com.thoughtworks.qdox.library.ClassLibrary;

public interface JavaPackage extends JavaModel, JavaAnnotatedElement
{

    /**
     * Returns all the classes found for the package.
     *
     * @return all the classes found for the package, never null
     */
    Collection getClasses();
    
    /**
     * Try to get any class of this package by name.
     * The name can be both the fully qualified name or just the name of the class.
     * 
     * @param name the (fully qualified) name of the class 
     * @return the matching class, otherwise null
     * @since 2.0
     */
    JavaClass getClassByName( String name );

    /**
     * The parent of this package
     * 
     * For instance: the package of java.lang.reflect is java.lang
     * 
     * @return the parent package, otherwise null
     */
    JavaPackage getParentPackage();

    /**
     * For instance: one of the children of java.lang would be java.lang.reflect
     * 
     * @return all the children of this package , never null
     */
    Collection getSubPackages();

    /**
     * Equivalent of {@link Package#getName()}
     * 
     * @return the name, should never be null
     */
    String getName();
    
    /**
     * The {@link ClassLibrary} of this package. 
     * 
     * @return the classLibrary, should never be null
     */
    ClassLibrary getJavaClassLibrary();
    
    /**
     * Equivalent of {@link Package#toString()}
     * 
     * @return the string representation of the package.
     */
    String toString();
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy