Friday, February 21, 2014
Added respondsTo, invoke from Ruby to Java (via Boon), and added Go Programming style interface support, and dynamic JSON, list, map marshaling
Wrote some code to speed up injection container construction and then went ahead and wrote some code to speed up the toList biz. Then wrote some additional code to speed up dynamic invoke.
Then I've always wanted to add some nice reflection utilities to easily invoke/marshal to Java objects. I wrote a Ruby style respondsTo method (cached methods, should be fairly fast). I also added JSON, List, and Map marshaling to Java method calls.
The respondsTo works with no args, class as args parameter types and objects as arguments.
Then on top of respondsTo I wrote Go Programming style interface support so you can have an interface and as long as you support all the methods in that interface, you object does not have to implement it. This is so you don't have to have 100 jar file dependencies for design by interface. Read up on Go Programming to see what I am talking about because I am not giving it justice.
Considering writing a respondsTo that works with JSON, maps and lists like the Invoker/Marshaler (seen at bottom of this post). I am also considering adding the ability for invoke to calling missingMethod(String methodName, Object... args):Object if the method can't be found and there is a missingMethod defined in the instance. :)
Please take a look at the Ruby style respondsTo in Java.