[stringtemplate-interest] Primitives and Model Adapters
Collin Fagan
collin.fagan at gmail.com
Fri Jan 28 11:15:38 PST 2011
Not that I know of, I looked for a while and then wrote my own. It's a
simple HashMap lookup, nothing fancy. Let me know and I can send it to you
when I get home.
On Fri, Jan 28, 2011 at 12:10 PM, Terence Parr <parrt at cs.usfca.edu> wrote:
>
> On Jan 28, 2011, at 5:59 AM, Collin Fagan wrote:
>
> > I understand, no problem at all. In this case though can we do one of two
> things?
> >
> > 1. Throw an IllegalArgumentException when one tries to register a model
> adapter on a primitive.
> > 2. Translate any primitive into it's boxed type during registration. ST
> already seems to treat return values of primitive types like boxed types
> when the template is run.
>
> is there a java method to convert int.class to Integer.class already?
> Ter
> _______________________________________________
> stringtemplate-interest mailing list
> stringtemplate-interest at antlr.org
> http://www.antlr.org/mailman/listinfo/stringtemplate-interest
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.antlr.org/pipermail/stringtemplate-interest/attachments/20110128/02c70a17/attachment.html
More information about the stringtemplate-interest
mailing list