Package: groovy.grape

## [Groovy] Class GrapeUtil

- groovy.grape.GrapeUtil

-     @CompileStatic
      class GrapeUtil
      extends Object

  Utility methods shared between GrapeIvy and GrapeMaven implementations.

  Since:
    6.0.0

- - ### Constructor Summary

    Constructors
    Constructor and description
    `GrapeUtil()`

  - ### Methods Summary

    Methods
    Type Params | Return Type | Name and description
    --- | --- | ---
    `` | `static void` | `addURL(ClassLoader loader, URI uri)` Adds a URI to a classloader's classpath via reflection.
    `` | `static boolean` | `checkForRunner(Collection<String> services)` Checks whether the discovered services include a Groovy runner provider.
    `` | `static void` | `processExtensionMethods(ClassLoader loader, File file)` Processes and registers category methods (extension modules) from a JAR file.
    `` | `static Collection<String>` | `processMetaInfServices(ClassLoader loader, File f)` Searches the given File for known service provider configuration files to process.
    `` | `static void` | `processRunners(InputStream is, String name, ClassLoader loader)` Processes and registers Groovy runner implementations from a service provider file.
    `` | `static void` | `registryLoad(ClassLoader classLoader)` Loads Groovy runners for the specified class loader.

  - ### Inherited Methods Summary

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

- - ### Constructor Detail

    - #### GrapeUtil()

  - ### Method Detail

    - #### static void addURL(ClassLoader loader, URI uri)

      Adds a URI to a classloader's classpath via reflection.

      Parameters:
        `loader` - the class loader to update
        `uri` - the URI to add to the class path

    - #### static boolean checkForRunner(Collection<String> services)

      Checks whether the discovered services include a Groovy runner provider.

      Parameters:
        `services` - the discovered service descriptors
      Returns:
        `true` if a Groovy runner provider was found

    - #### static void processExtensionMethods(ClassLoader loader, File file)

      Processes and registers category methods (extension modules) from a JAR file.

      Parameters:
        `loader` - the classloader to register methods with
        `file` - the JAR file to process

    - #### static Collection<String> processMetaInfServices(ClassLoader loader, File f)

      Searches the given File for known service provider configuration files to process.

      Parameters:
        `loader` - used to locate service provider files
        `f` - ZipFile in which to search for services
      Returns:
        a collection of service provider files that were found

    - #### static void processRunners(InputStream is, String name, ClassLoader loader)

      Processes and registers Groovy runner implementations from a service provider file.

      Parameters:
        `is` - the input stream containing runner class names
        `name` - the name to register the runners under
        `loader` - the classloader to load runner classes from

    - #### static void registryLoad(ClassLoader classLoader)

      Loads Groovy runners for the specified class loader.

      Parameters:
        `classLoader` - the class loader to inspect