code: public static Class<? extends VersionedProtocol> getProtocolByName(final String className)
  			throws ClassNotFoundException {
  
  		if (!className.contains("Protocol")) {
  			throw new ClassNotFoundException("Only use this method for protocols!");
  		}
  
  		return (Class<? extends VersionedProtocol>) Class.forName(className, true, getClassLoader()).asSubclass(VersionedProtocol.class);
  	}
docs: Searches for a protocol class by its name and attempts to load it.
  
  @param className
  the name of the protocol class
  @return an instance of the protocol class
  @throws ClassNotFoundException
  thrown if no class with such a name can be found