docs: public <T> T getInterface(ScriptWrapper script, Class<T> class1) throws ScriptException, IOException {
  	
  		ClassLoader previousContextClassLoader = Thread.currentThread().getContextClassLoader();
  		Thread.currentThread().setContextClassLoader(ExtensionFactory.getAddOnLoader());
  		try {
  			T iface = script.getInterface(class1);
  			
  			if (iface != null) {
  				// the script wrapper has overriden the usual scripting mechanism
  				return iface;
  			}
  		} finally {
  			Thread.currentThread().setContextClassLoader(previousContextClassLoader);
  		}
  		
  		if (script.isRunableStandalone()) {
  			return null;
  		}
  
  		Invocable invocable = invokeScript(script);
  		if (invocable != null) {
  			return invocable.getInterface(class1);
  		}
  		return null;
  
  	}