Interface JavaPackage

All Superinterfaces:
JavaAnnotatedElement, JavaModel, Serializable
All Known Implementing Classes:
DefaultJavaPackage

public interface JavaPackage extends JavaModel, JavaAnnotatedElement
  • Method Details

    • getClasses

      Collection<JavaClass> getClasses()
      Returns all the classes found for the package.
      Returns:
      all the classes found for the package, never null
    • getClassByName

      JavaClass getClassByName(String name)
      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.
      Parameters:
      name - the (fully qualified) name of the class
      Returns:
      the matching class, otherwise null
      Since:
      2.0
    • getParentPackage

      JavaPackage getParentPackage()
      The parent of this package For instance: the package of java.lang.reflect is java.lang
      Returns:
      the parent package, otherwise null
    • getSubPackages

      Collection<JavaPackage> getSubPackages()
      For instance: one of the children of java.lang would be java.lang.reflect
      Returns:
      all the children of this package , never null
    • getName

      String getName()
      Equivalent of Package.getName()
      Returns:
      the name, should never be null
    • getJavaClassLibrary

      ClassLibrary getJavaClassLibrary()
      The ClassLibrary of this package.
      Returns:
      the classLibrary, should never be null
    • toString

      String toString()
      Equivalent of Package.toString()
      Overrides:
      toString in class Object
      Returns:
      the string representation of the package.