Home | History | Annotate | Download | only in model
      1 /*
      2  * Copyright (C) 2009 The Android Open Source Project
      3  *
      4  * Licensed under the Apache License, Version 2.0 (the "License");
      5  * you may not use this file except in compliance with the License.
      6  * You may obtain a copy of the License at
      7  *
      8  *      http://www.apache.org/licenses/LICENSE-2.0
      9  *
     10  * Unless required by applicable law or agreed to in writing, software
     11  * distributed under the License is distributed on an "AS IS" BASIS,
     12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
     13  * See the License for the specific language governing permissions and
     14  * limitations under the License.
     15  */
     16 
     17 package signature.model;
     18 
     19 import java.util.List;
     20 import java.util.Set;
     21 
     22 /**
     23  * {@code IPackage} models a package.
     24  */
     25 public interface IPackage extends IAnnotatableElement {
     26 
     27     /**
     28      * Returns the name of this package.
     29      *
     30      * @return the name of this package
     31      */
     32     String getName();
     33 
     34     /**
     35      * Returns a list containing each package fragment.
     36      * <p>
     37      * If {@link #getName()} returns : "a.b.c" this method returns a list
     38      * containing the three elements "a", "b", "c".
     39      * <p>
     40      * Note: this method exists only for convenience in output templating.
     41      *
     42      * @return a list containing each package fragment
     43      */
     44     List<String> getPackageFragments();
     45 
     46     /**
     47      * Returns all classes declared in this package, including ordinary classes,
     48      * interfaces, enum types and annotation types. Nested classes are returned
     49      * as well.
     50      *
     51      * @return all classes declared in this package
     52      */
     53     Set<IClassDefinition> getClasses();
     54 }
     55