T - The type that the external tool is accessed through, will not reference the external
tool classes.public class ExternalToolLoader<T>
extends java.lang.Object
| Constructor and Description |
|---|
ExternalToolLoader(java.lang.Class<T> pProxyClass,
java.lang.String pProxyImplementationPackage,
java.lang.String pProxyImplementationClass,
java.util.function.Supplier<org.gradle.api.file.FileCollection> pToolClassPathSource)
Create a new
ExternalToolLoader. |
| Modifier and Type | Method and Description |
|---|---|
T |
createToolProxy()
Create an instance of the proxy implementation class.
|
public ExternalToolLoader(java.lang.Class<T> pProxyClass, java.lang.String pProxyImplementationPackage, java.lang.String pProxyImplementationClass, java.util.function.Supplier<org.gradle.api.file.FileCollection> pToolClassPathSource)
ExternalToolLoader.pProxyClass - The class (normally an interface) through which the external tool is
accessed.pProxyImplementationPackage - The name of the package in which the proxy implementation class and any
helper classes reside. All classes in this package will be loaded by the
class loader that also loads the external tool classes.pProxyImplementationClass - The name of the class that extends/implements the proxy class/interface
and is allowed to reference the external tool classes.pToolClassPathSource - A file collection containing the external tool classes.java.lang.NullPointerException - if any of the parameters is null.public T createToolProxy() throws java.lang.ClassNotFoundException, java.lang.IllegalAccessException, java.lang.InstantiationException
T implementation, never null.java.lang.ClassNotFoundException - if the implementation class cannot be found.java.lang.IllegalAccessException - if the implementation class' default constructor isn't
accessible.java.lang.InstantiationException - if the implementation class doesn't have a default
constructor, of if it is abstract, or cannot be instantiated
for some other reason.java.lang.ClassCastException - if the proxy implementation class cannot be cast to the
proxy interface/class.