Interface JPackage

All Superinterfaces:
HasAnnotations

public interface JPackage extends HasAnnotations
Represents a logical package.
  • Method Details

    • findType

      JClassType findType(String typeName)
      Finds a type in this package.
      Parameters:
      typeName - the name of the type; use the . separator to find a nested type
      Returns:
      the type, or null if the type does not exist in this package
    • findType

      @Deprecated JClassType findType(String[] typeName)
      Deprecated.
      Finds a type in this package.
      Parameters:
      typeName - the name of the type; use additional array elements to find a nested type
      Returns:
      the type, or null if the type does not exist in this package
    • getName

      String getName()
      Returns the name of the package.
    • getType

      JClassType getType(String typeName) throws NotFoundException
      Finds a type in this package.
      Parameters:
      typeName - the name of the type; use the . separated to search for a nested type
      Returns:
      the type, or null if the type does not exist in this package
      Throws:
      NotFoundException
    • getTypes

      JClassType[] getTypes()
      Returns all top-level types in this package.
    • isDefault

      boolean isDefault()
      Returns true only for the default package.