code: @SuppressWarnings("unchecked") // We check this ourselves with isAssignableFrom()
      private Class<AuthenticationProvider> getAuthenticationProviderClass(String name)
              throws GuacamoleException {
  
          try {
  
              // Get authentication provider class
              Class<?> authenticationProviderClass = classLoader.loadClass(name);
  
              // Verify the located class is actually a subclass of AuthenticationProvider
              if (!AuthenticationProvider.class.isAssignableFrom(authenticationProviderClass))
                  throw new GuacamoleServerException("Authentication providers MUST extend the AuthenticationProvider class.");
  
              // Return located class
              return (Class<AuthenticationProvider>) authenticationProviderClass;
  
          }
          catch (ClassNotFoundException e) {
              throw new GuacamoleException("Authentication provider class not found.", e);
          }
          catch (LinkageError e) {
              throw new GuacamoleException("Authentication provider class cannot be loaded (wrong version of API?).", e);
          }
  
      }
docs: Retrieve the AuthenticationProvider subclass having the given name. If
  the class having the given name does not exist or isn't actually a
  subclass of AuthenticationProvider, an exception will be thrown.
  
  @param name
  The name of the AuthenticationProvider class to retrieve.
  
  @return
  The subclass of AuthenticationProvider having the given name.
  
  @throws GuacamoleException
  If no such class exists, or if the class with the given name is not
  a subclass of AuthenticationProvider.