To me, the Reference class actually seems quite lightweight and efficient for 
the amount of usefulness and flexibility it provides to consumers and mutators 
of the Reference.  I understand the idea of having nice syntax for building up 
a Reference.  What if there was something independent, like a URIBuilder class, 
that supplied such syntax and could emit a String, java.net.URI, or Reference?

----- Original Message ----- 
From: "Kevin Conaway" <[EMAIL PROTECTED]> 
To: [email protected] 
Sent: Thursday, November 29, 2007 3:06:57 PM (GMT-0500) America/New_York 
Subject: Re: Lightweight alternative to Reference 

Hi Mike, 

The problem with java.net.URI is that you must specify the URI parts at 
construction time. There are no setters and no way to nicely build a URI 
piecemeal. That leads to string concatenation and other ugliness 

Kevin 


On Nov 29, 2007 2:43 PM, Mike Brzozowski < [EMAIL PROTECTED] > wrote: 



Kevin Conaway <kevin.conaway <at> gmail.com > writes: 
> Would it be possible add a new class called URI to facilitate building URIs 
> to 
use in client calls? It can be cumbersome to either build the uri as a string 
by hand or use the heavy Reference class.I suggest adding a lightweight class 
called URI that allows users to easily build URIs like the following: 

Check out the URI class introduced in JDK 1.4... it might do much of what 
you're 
looking for: 

http://java.sun.com/javase/6/docs/api/java/net/URI.html 

--Mike 


Reply via email to