On Dec 4, 8:01 pm, Randall R Schulz <[EMAIL PROTECTED]> wrote:
> Hi,
>
> I have a fairly elaborate library for representing roughly JSON-like
> data. It has the ability to create JavaBean counterparts to any of its
> values, whether atomic or structured.
>
> In order to see how this might interact with (bean ...), I tried this:
>
> user=> (bean (new Boolean true))
> java.lang.NoClassDefFoundError: clojure/core$bean__4456$fn__4458
>
> In fact, I've yet to find an invocation of (bean ...) that produces
> anything other than a NCDFE.
>
> What can (bean ...) do? What are the required / allowed arguments? The
> documentation is a big ... vague:
>
> "Takes a Java object and returns a read-only implementation
> of the map abstraction based upon its JavaBean properties."
>
Hmmm... works here:
(bean (new Boolean true))
-> {:class java.lang.Boolean}
(bean (java.util.Date.))
-> {:year 108, :class java.util.Date, :date 4, :minutes 4, :month
11, :day 4, :seconds 8, :timezoneOffset 300, :hours 20, :time
1228439048120}
(bean (javax.swing.JButton.))
-> {:actionCommand "", :containerListeners #<ContainerListener[]
[Ljava.awt.event.ContainerListener;@a76581>, :actionMap #<ActionMap
[EMAIL PROTECTED]>, :changeListeners #<ChangeListener[]
[Ljavax.swing.event.ChangeListener;@65d26c>, :inputVerifier
nil, :doubleBuffered false ...
Rich
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Clojure" group.
To post to this group, send email to clojure@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en
-~----------~----~----~----~------~----~------~--~---