code: public static URL codeLocationFromClass(Class<?> codeLocationClass) {
          String pathOfClass = codeLocationClass.getName().replace(".", "/") + ".class";
          URL classResource = codeLocationClass.getClassLoader().getResource(pathOfClass);
          String codeLocationPath = removeEnd(getPathFromURL(classResource), pathOfClass);
          if(codeLocationPath.endsWith(".jar!/")) {
              codeLocationPath=removeEnd(codeLocationPath,"!/");
          }
          return codeLocationFromPath(codeLocationPath);
      }
docs: Creates a code location URL from a class
  
  @param codeLocationClass the class
  @return A URL created from Class
  @throws InvalidCodeLocation if URL creation fails