commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Matt Benson <gudnabr...@yahoo.com>
Subject Re: [lang] notice of itch to commit
Date Wed, 24 Oct 2007 16:21:08 GMT
Top post:  Making sure interested parties are aware of
https://issues.apache.org/jira/browse/LANG-362 .  If I
don't receive any negative comments I will commit this
stuff in the next couple of days.

-Matt

--- Ben Speakmon <bspeakmon@apache.org> wrote:

> That's why I brought it up, just wanted that feature
> for as cheap as
> possible. :)
> 
> I know some work has been done on a JDK 5 lang; if
> we add new stuff to
> 2.3I'd like it to be as easy as possible to
> integrate into whatever
> comes out
> of the 5 effort.
> 
> On 10/5/07, Matt Benson <gudnabrsam@yahoo.com>
> wrote:
> >
> >
> > --- James Carman <james@carmanconsulting.com>
> wrote:
> >
> > > Ok, cool.  I don't really like global stuff like
> > > that either.  But,
> > > some libraries (beanutils for one) do that kind
> of
> > > stuff.  I like the
> > > idea of having your own instances of this and I
> like
> > > the idea of the
> > > feature.  Very cool!  Also, the varargs feature
> > > would be very nice.
> > > They've already made MessageFormat use varargs
> in
> > > 1.5, so it would
> > > fit.
> >
> > Doh--I hadn't noticed that.  That being the case,
> we
> > should inherit it for free if
> ExtendedMessageFormat
> > does what it says and extends MessageFormat.  :) 
> So
> > this wouldn't require Lang moving to JDK5 just for
> > this.
> >
> > -Matt
> >
> > >
> > > On 10/5/07, Matt Benson <gudnabrsam@yahoo.com>
> > > wrote:
> > > >
> > > > --- James Carman <james@carmanconsulting.com>
> > > wrote:
> > > >
> > > > > You mean this extension would allow some
> sort of
> > > > > "registry" which is
> > > > > keyed by the second argument of the format
> > > > > expression?  So, I could do
> > > > > something like...
> > > > >
> > > > > ExtendedMessageFormat fmt = new
> > > > > ExtendedMessageFormat();
> > > > > fmt.addFormatHandler("foo", new
> MyFooHandler()
> > > );
> > > > > String str = fmt.format("Hello, {0,foo}!",
> > > "James
> > > > > Carman");
> > > > >
> > > > > Now maybe you'd register the "handler"
> globally,
> > > but
> > > > > you get the idea.
> > > >
> > > > That's essentially the effect I want to
> achieve.
> > > As
> > > > for global blah, I am more interested in doing
> > > things
> > > > on a POJO basis; I think there are plenty of
> > > solutions
> > > > out there anymore that would allow a user to
> > > automate
> > > > the config for multiple instances that there's
> no
> > > > percentage in resorting to weird tricks to get
> all
> > > > instances of the proposed
> ExtendedMessageFormat to
> > > use
> > > > the same custom delegate formats.
> > > >
> > > > -Matt
> > > >
> > > > >
> > > > > On 10/5/07, Matt Benson
> <gudnabrsam@yahoo.com>
> > > > > wrote:
> > > > > >
> > > > > > --- Henri Yandell <flamefew@gmail.com>
> wrote:
> > > > > >
> > > > > > > Out of interest; related to a JIRA
> issue?
> > > > > > >
> > > > > >
> > > > > > Actually no.  I guess I'll go ahead and
> lay my
> > > > > cards
> > > > > > on the table in case anyone has any wisdom
> for
> > > me.
> > > > >  An
> > > > > > obviously missing piece of
> > > java.text.MessageFormat
> > > > > is
> > > > > > the ability to plug in other custom
> > > formatters.
> > > > > I've
> > > > > > only seen one OSS project (msg at
> java.net)
> > > that
> > > > > > addresses this, and it has a dubious
> > > configuration
> > > > > > mechanism (magic XML classpath resource)
> and
> > > an
> > > > > IMHO
> > > > > > useless inheritance hierarchy i.e.
> > > > > > java.lang.Object--the project claims its
> > > > > > XMessageFormat is a "drop-in replacement"
> but
> > > > > > apparently their idea of drop-in differs
> from
> > > > > mine.
> > > > > > IMO such a solutiion would necessarily
> need to
> > > > > extend
> > > > > > Format and very likely MessageFormat as
> well;
> > > a
> > > > > Format
> > > > > > implicitly understood to operate upon
> Object[]
> > > is
> > > > > good
> > > > > > enough from a javadoc POV but I have the
> > > feeling
> > > > > that
> > > > > > much existing code would cope better with
> a
> > > > > > MessageFormat subclass.  For these reasons
> I
> > > > > assert
> > > > > > that I am not just indulging in NIH.  Lang
> > > already
> > > > > > provides the CompositeFormat in
> > > o.a.c.lang.text;
> > > > > this
> > > > > > constitutes IMO a precedent for custom
> Formats
> > > to
> > > > > live
> > > > > > in Lang.  It is my intent to create
> > > > > > o.a.c.lang.text.ExtendedMessageFormat
> (extends
> > > > > > java.text.MessageFormat) with a pluggable
> > > means of
> > > > > > resolving delegate formatters (optionally)
> > > > > specified
> > > > > > with each "format element".  My intent is
> to
> > > > > provide a
> > > > > > subclass whose default behavior is
> identical
> > > to
> > > > > its
> > > > > > parent class but provides extensibility
> for
> > > > > plugging
> > > > > > in custom formats.
> > > > > >
> > > > > > Comments?
> > > > > >
> > > > > > -Matt
> > > > > >
> > > > > > > On 10/4/07, Matt Benson
> > > <gudnabrsam@yahoo.com>
> > > > > > > wrote:
> > > > > > > > in org.apache.commons.lang.text
> > > > > > > >
> > > > > > > > -Matt
> > > > > > > >
> > > > > > > >
> > > > > > > >
> > > > > > > >
> > > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
> >
>
____________________________________________________________________________________
> > > > > > > > Pinpoint customers who are looking for
> > > what
> > > > > you
> > > > > > > sell.
> > > > > > > > http://searchmarketing.yahoo.com/
> > > > > > > >
> > > > > > > >
> > > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
>
---------------------------------------------------------------------
> > > > > > > > To unsubscribe, e-mail:
> > > > > > > dev-unsubscribe@commons.apache.org
> > > > > > > > For additional commands, e-mail:
> > > > > > > dev-help@commons.apache.org
> > > > > > > >
> > > > > > > >
> > > > > > >
> > > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
>
---------------------------------------------------------------------
> > > > > > > To unsubscribe, e-mail:
> > > > > > > dev-unsubscribe@commons.apache.org
> > > > > > > For additional commands, e-mail:
> > > > > > > dev-help@commons.apache.org
> > > > > > >
> > > > > > >
> > > > > >
> > > > > >
> > > > > >
> > > > > >
> > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
> >
>
____________________________________________________________________________________
> > > > > > Looking for a deal? Find great prices on
> > > flights
> > > > > and hotels with Yahoo! FareChase.
> > > > > > http://farechase.yahoo.com/
> > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
>
---------------------------------------------------------------------
> > > > > > To unsubscribe, e-mail:
> > > > > dev-unsubscribe@commons.apache.org
> > > > > > For additional commands, e-mail:
> > > > > dev-help@commons.apache.org
> > > > > >
> > > > > >
> > > > >
> > > > >
> > > >
> > >
> >
>
---------------------------------------------------------------------
> > > > > To unsubscribe, e-mail:
> > > > > dev-unsubscribe@commons.apache.org
> > > > > For additional commands, e-mail:
> > > > > dev-help@commons.apache.org
> > > > >
> > > > >
> > > >
> > > >
> > > >
> > > >
> > > >
> > >
> >
> >
>
____________________________________________________________________________________
> > > > Be a better Globetrotter. Get better travel
> > > answers from someone who knows. Yahoo! Answers -
> > > Check it out.
> > > >
> > >
> >
>
http://answers.yahoo.com/dir/?link=list&sid=396545469
> > > >
> > > >
> > >
> >
>
---------------------------------------------------------------------
> > > > To unsubscribe, e-mail:
> > > dev-unsubscribe@commons.apache.org
> > > > For additional commands, e-mail:
> > > dev-help@commons.apache.org
> > > >
> > > >
> > >
> > >
> >
>
---------------------------------------------------------------------
> > > To unsubscribe, e-mail:
> > > dev-unsubscribe@commons.apache.org
> > > For additional commands, e-mail:
> > > dev-help@commons.apache.org
> > >
> > >
> >
> >
> >
> >
> >      
>
____________________________________________________________________________________
> > Shape Yahoo! in your own image.  Join our Network
> Research Panel today!
> >
>
http://surveylink.yahoo.com/gmrs/yahoo_panel_invite.asp?a=7
> >
> >
> >
> >
>
---------------------------------------------------------------------
> > To unsubscribe, e-mail:
> dev-unsubscribe@commons.apache.org
> > For additional commands, e-mail:
> dev-help@commons.apache.org
> >
> >
> 


__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org
For additional commands, e-mail: dev-help@commons.apache.org


Mime
View raw message