Package: org.apache.groovy.groovysh.jline

## [Java] Class PackageHelper

- org.apache.groovy.groovysh.jline.PackageHelper

-     public class PackageHelper
      extends Object

- - ### Methods Summary

    Methods
    Type Params | Return Type | Name and description
    --- | --- | ---
    `` | `public static List<String>` | `getClassNamesForPackage(String packageName, ClassLoader classLoader)` Attempts to list all the class names in the specified package as determined by the Groovy class loader classpath
    `` | `public static List<Object>` | `getClassesForPackage(String packageName, GroovyClassLoader classLoader, Function<String, Class<?>> classResolver)` Attempts to list all the classes in the specified package as determined by the Groovy class loader classpath
    `` | `public static List<Object>` | `getClassesForPackage(String packageName)` Attempts to list all the classes in the specified package as determined by the context class loader
    `` | `public boolean` | `hasMoreElements()`
    `` | `public URL` | `nextElement()`

  - ### Inherited Methods Summary

    Inherited Methods
    Methods inherited from class | Name
    --- | ---
    `class Object` | `equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Method Detail

    - #### @SuppressWarnings("unchecked")
      public static List<String> getClassNamesForPackage(String packageName, ClassLoader classLoader)

      Attempts to list all the class names in the specified package as determined by the Groovy class loader classpath

      Parameters:
        `packageName` - the package name to search
        `classLoader` - class loader
      Returns:
        a list of class names that exist within that package

    - #### public static List<Object> getClassesForPackage(String packageName, GroovyClassLoader classLoader, Function<String, Class<?>> classResolver)

      Attempts to list all the classes in the specified package as determined by the Groovy class loader classpath

      throws:
        ClassNotFoundException if something went wrong
      Parameters:
        `packageName` - the package name to search
        `classLoader` - Groovy class loader
        `classResolver` - resolve class from class name
      Returns:
        a list of classes that exist within that package

    - #### public static List<Object> getClassesForPackage(String packageName)

      Attempts to list all the classes in the specified package as determined by the context class loader

      throws:
        ClassNotFoundException if something went wrong
      Parameters:
        `packageName` - the package name to search
      Returns:
        a list of classes that exist within that package

    - #### public boolean hasMoreElements()

    - #### public URL nextElement()