Re: unbean

2009-02-27 Thread John D. Hume
stract class for which there is no constructor. You could gen-class as needed to create concrete interface implementations or subclasses. This would probably be a terrible idea if unbean were for general use, but if you're focused on testing it could keep things cleaner (and prevent you clutteri

Re: unbean

2009-02-26 Thread Kevin Albrecht
Thanks. I will definitely be using this function... keep me up to date on any changes. Bill wrote: > > It occurs to me that the "unbean" function could be very useful when > > writing tests for code that calls Java objects. > > Yes, that is ex

Re: unbean

2009-02-25 Thread .Bill Smith
> It occurs to me that the "unbean" function could be very useful when > writing tests for code that calls Java objects. Yes, that is exactly the use I have in mind. Bill --~--~-~--~~~---~--~~ You received this message because you are subscrib

Re: unbean

2009-02-25 Thread Kevin Albrecht
It occurs to me that the "unbean" function could be very useful when writing tests for code that calls Java objects. Anyone have thoughts on its use in this way? On Feb 24, 9:18 pm, ".Bill Smith" wrote: > > I tend to associate "bean" with Java beans, so the

Re: unbean

2009-02-24 Thread .Bill Smith
> I tend to associate "bean" with Java beans, so the naming seems to be > reversed IMHO: "bean" should convert a Clojure map to a Java bean, and > "unbean" should do the reverse. Agreed the name is awkward. > It's getting late here so I don'

Re: unbean

2009-02-24 Thread Michel S.
On Feb 24, 10:30 pm, ".Bill Smith" wrote: > I finally got around to writing an "unbean" function.   As the name > suggests, it's the reverse of the bean function: it takes a class and > a map of property name/values and returns an instance of that class >

unbean

2009-02-24 Thread .Bill Smith
I finally got around to writing an "unbean" function. As the name suggests, it's the reverse of the bean function: it takes a class and a map of property name/values and returns an instance of that class with those property values. So for example, if class House has prop