src/main/java/com/cloudbees/sdk/extensibility/ExtensionFinder.java
protected  <T> ExtensionLoaderModule<T> createLoaderModule(Class<T> extensionPoint) {
        ExtensionPoint ep = extensionPoint.getAnnotation(ExtensionPoint.class);
        if (ep!=null) {
            if (ep.loader()!=ExtensionLoaderModule.Default.class) {
                try {
                    return (ExtensionLoaderModule)ep.loader().newInstance();
                } catch (InstantiationException e) {
                    throw (Error)new InstantiationError().initCause(e);
                } catch (IllegalAccessException e) {
                    throw (Error)new IllegalAccessError().initCause(e);
                }
            }
        }
        return new ExtensionLoaderModule.Default<T>();
    }
protected  <T> ExtensionLoaderModule<T> createLoaderModule(Class<T> extensionPoint) {
        ExtensionPoint ep = extensionPoint.getAnnotation(ExtensionPoint.class);
        if (ep!=null) {
            if (ep.loader()!=ExtensionLoaderModule.Default.class) {
                try {
                    return (ExtensionLoaderModule)ep.loader().newInstance();
                } catch (InstantiationException e) {
                    throw (Error)new InstantiationError().initCause(e);
                } catch (IllegalAccessException e) {
                    throw (Error)new IllegalAccessError().initCause(e);
                }
            }
        }
        return new ExtensionLoaderModule.Default<T>();
    }
protected < T > ExtensionLoaderModule < T > createLoaderModule ( Class < T > extensionPoint ) { ExtensionPoint ep = extensionPoint . getAnnotation ( ExtensionPoint . class ) ; if ( ep != null ) { if ( ep . loader ( ) != ExtensionLoaderModule . Default . class ) { try { return ( ExtensionLoaderModule ) ep . loader ( ) . newInstance ( ) ; } catch ( InstantiationException e ) { throw ( Error ) new InstantiationError ( ) . initCause ( e ) ; } catch ( IllegalAccessException e ) { throw ( Error ) new IllegalAccessError ( ) . initCause ( e ) ; } } } return new ExtensionLoaderModule . Default < T > ( ) ; }
Creates a new instance of {@link ExtensionLoaderModule} to be used to
load the extension of the given type.
Creates a new instance of {