uwcpdx / bean-dip Goto Github PK
View Code? Open in Web Editor NEWBidirectional translation between maps and Java beans that's declarative and reflection-free.
Bidirectional translation between maps and Java beans that's declarative and reflection-free.
Is it possible to use this library on a class that does not have public constructors, but rather a static factory?
For example, https://github.com/URL-Detector/URL-Detector/blob/master/url-detector/src/main/java/com/linkedin/urls/Url.java
Hi,
I'm converting a fairly complex java object to a clojure map, everything appears to be working correctly apart from a field that is defined as a:
java.util.List<java.lang.String>
When executing ClassName->map with this field defined I'm getting the error:
CompilerException java.lang.IllegalArgumentException: No implementation of method: :bean->map of protocol: #'bean-dip.core/TranslatableToMap found for class: java.lang.String
What do I need to do to resolve this?
Thanks
If a java bean has more than eight fields and these are specified in def-translation
then not all of these fields will be converted.
I believe this is as a consequence of the way that transient maps are being used/work.
Specifically, the return value of assoc! should always be used, rather than using the original "transient" symbol returned from (clojure.core/transient {})
class Bean{ private boolean foo = false; public boolean isFoo(){ return foo; } ... }
(bean/def-translation Bean #{:foo?}) (Bean->map (new Foo) ;=> {}
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.