Gets the base ur as String.

@param pageClass
the page class
@param parameters
the parameters
@return the base url as String.
199734
public static String toBaseUrl(final Class<? extends Page> pageClass,
		final PageParameters parameters)
	{
		return getBaseUrl(pageClass, parameters).canonical().toString();
	}
857804
public static String getStringFromUrl(String urlString) {
    ApacheHttpClient lclient = ApacheHttpClient.create();
    WebResource webResource = lclient.resource(urlString);
    ClientResponse response = webResource.get(ClientResponse.class);

    if (response.getStatus() != 200) {
      throw new RuntimeException("HTTP error code : " + response.getStatus());
    }
    String result = response.getEntity(String.class);
    return result;
  }
1162701
public static URL findResourceBase(String baseResource, ClassLoader loader)
   {
      URL url = loader.getResource(baseResource);
      return findResourceBase(url, baseResource);
   }
34978
public static void schedule(final Class<? extends IRequestablePage> pageClass,
		final PageParameters parameters)
	{
		RequestHandlerFactory.schedule(PageProviderFactory.newPageProvider(pageClass, parameters));
	}
560510
def get_resource_url(self):
        

        name = self.__class__.resource_name
        url = self.__class__.rest_base_url()

        return "%s/%s" % (url, name)
682605
private String getThemeString(PageParameters parameters){
        String themeString = "default";
        if (parameters.getAllNamed().size() < 2) {
            return themeString;
        } else {
            themeString= parameters.getAllNamed().get(0).getValue();
        }
        return themeString;
    }
623922
public String getURL(String classAndParams) throws IOException, SQLException {
		String className, params;
		int pos=classAndParams.indexOf('?');
		if(pos==-1) {
			className=classAndParams;
			params=null;
		} else {
			className=classAndParams.substring(0, pos);
			params=classAndParams.substring(pos+1);
		}
		return getURL(className, params);
	}
557765
public static String newWwwUrlEncodedUrl(final String baseUrl,
        final Map<String, String> paramMap)
        {
        final StringBuilder sb = new StringBuilder();
        sb.append(baseUrl);
        sb.append(getUrlParameters(paramMap, false));
        return sb.toString();
        }
555799
public static String urlFrom( String baseUrl,
                                  String... pathSegments ) {
        StringBuilder urlBuilder = new StringBuilder(baseUrl);
        if (urlBuilder.charAt(urlBuilder.length() - 1) == '/') {
            urlBuilder.deleteCharAt(urlBuilder.length() - 1);
        }
        for (String pathSegment : pathSegments) {
            if (pathSegment.equalsIgnoreCase("..")) {
                urlBuilder.delete(urlBuilder.lastIndexOf("/"), urlBuilder.length());
            } else {
                if (!pathSegment.startsWith("/")) {
                    urlBuilder.append("/");
                }
                urlBuilder.append(pathSegment);
            }
        }
        return urlBuilder.toString();
    }
518207
def base_url(klass, space_id, resource_id=None, public=False, environment_id=None, **kwargs):
        

        if public:
            environment_slug = ""
            if environment_id is not None:
                environment_slug = "/environments/{0}".format(environment_id)
            return "spaces/{0}{1}/public/content_types".format(space_id, environment_slug)
        return super(ContentType, klass).base_url(
            space_id,
            resource_id=resource_id,
            environment_id=environment_id,
            **kwargs
        )
52124
public String getURL(Class<? extends WebPage> clazz, Object param) throws IOException, SQLException {
		WebPage page=WebPage.getWebPage(sourcePage.getServletContext(), clazz, param);
		return getURL(page, param);
	}
1085402
private static String[] getHttpMethodAndPath(Class<?> actionClass){
		if(null == actionClass){
			return null;
		}
		
		Route routeAnnotation = actionClass.getAnnotation(Route.class);
		if(null != routeAnnotation){
			return getHttpMethodAndPath(routeAnnotation);
		}else{
			return new String[]{null, StrUtil.lowerFirst(StrUtil.removeSuffix(actionClass.getSimpleName(), HuluSetting.actionSuffix))};
		}
	}
1021444
def URL(base, path, segments=None, defaults=None):
    
    # Make a copy of the Segments class
    url_class = type(Segments.__name__, Segments.__bases__,
                     dict(Segments.__dict__))
    segments = [] if segments is None else segments
    defaults = [] if defaults is None else defaults
    # For each segment attach a property capable of getting and setting it
    for segment in segments:
        setattr(url_class, segment, url_class._segment(segment))
    # Instantiate the class with the actual parameters
    return url_class(base, path, segments, defaults)
10876
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);
    }
1346031
protected String getBaseUrl(String url) {
    	if (url.endsWith("/")) {
    	    return url.substring(0, url.length() - 1);
    	}
    	else {
    	    return url;
    	}
    	
    }
1014821
private static String getUrl(final Map<String, String> properties) {
		String url = properties.get("url");
		if (url == null) {
			throw new IllegalArgumentException("URL is missing for JDBC writer");
		} else {
			return url;
		}
	}
1246963
public com.google.protobuf.ByteString
      getUrlQueryParameterBytes() {
    java.lang.Object ref = urlQueryParameter_;
    if (ref instanceof java.lang.String) {
      com.google.protobuf.ByteString b = 
          com.google.protobuf.ByteString.copyFromUtf8(
              (java.lang.String) ref);
      urlQueryParameter_ = b;
      return b;
    } else {
      return (com.google.protobuf.ByteString) ref;
    }
  }