code: public static String getAllResourcesNames(String url, boolean singularize) {
  
  		StringBuilder stringBuilder = new StringBuilder();
  		if (StringUtils.hasText(url)) {
  			String[] resources = SLASH.split(url);
  			int lengthCounter = 0;
  			for (int i = resources.length - 1; i >= Config.getResourceTopLevelInClassNames() + 1; --i) {
  				if (StringUtils.hasText(resources[i])) {
  					String resourceName = getResourceName(resources[i], singularize);
  					if (Config.isReverseOrderInClassNames()) {
  						stringBuilder.append(resourceName);
  					} else {
  						stringBuilder.insert(0, resourceName);
  					}
  					++lengthCounter;
  				}
  				if (Config.getResourceDepthInClassNames() > 0 && lengthCounter >= Config.getResourceDepthInClassNames()) {
  					break;
  				}
  			}
  		}
  
  		return stringBuilder.toString();
  	}
docs: Attempts to infer the name of a resource from a resources's full URL.
  
  @param url
  The URL of the raml resource being parsed
  @param singularize
  Indicates if the resource name should be singularized or not
  @return name of a resource