org.wildfly.swarm.spi.api

## Interface ClassLoading

-     public interface ClassLoading

  Utility to execute code within a context using a particular `ClassLoader` as the thread-context-classloader.

- - ### Method Summary

    All Methods Static Methods Default Methods
    Modifier and Type | Method and Description
    --- | ---
    `static <T> T` | `withTCCL(ClassLoader loader, Callable<T> action)` With a given `ClassLoader`, execute an action with that classloader as the TCCL.

- - ### Method Detail

    - #### withTCCL

          static <T> T withTCCL(ClassLoader loader,
                                Callable<T> action)

      With a given `ClassLoader`, execute an action with that classloader as the TCCL.

      This method will safely reset the TCCL for the duration of the action, while returning it to it's original value when the action completes, either successfully or exceptionally.

      Type Parameters:
        `T` - The return type from the action.
      Parameters:
        `loader` - The classloader.
        `action` - The action to execute.
      Returns:

Copyright © 2018 JBoss by Red Hat. All rights reserved.