[rules-dev] Instantiating class with no constructor

Mark Proctor mproctor at codehaus.org
Sat Feb 10 09:23:44 EST 2007


I chatted to jason and he recommended a multi strategy.
1) weaving on startup (i.e. injecting no argument constructors) if you 
own the AS
2) using Sub14RefletionProvider if you are on a VM that supports it, 
several do
3) finding equivalents to above if you are different vm
4) resorting to what we do now, where users much impl no arg constructor 
themselves.

Mark
Edson Tirelli wrote:
>
>   Mark,
>
>   Nice treasure you found. I will do some research to be able to use 
> the same for shadow facts when the classes are available in the JVM..
>
>   []s
>   Edson
>
> Mark Proctor wrote:
>
>> XStream can instantiate classes that 1) do not implement 
>> serialiseable and 2) do not have a default constructor. Here is now
>> Sun14ReflectionProvider
>> http://svn.xstream.codehaus.org/browse/xstream/trunk/xstream/src/java/com/thoughtworks/xstream/converters/reflection/Sun14ReflectionProvider.java?r=1049 
>>
>>
>> It may not work on all VMs, but we could have it as a pluggeable 
>> strategy, would help solve a lot of use cases :)
>>
>> Mark
>> _______________________________________________
>> rules-dev mailing list
>> rules-dev at lists.jboss.org
>> https://lists.jboss.org/mailman/listinfo/rules-dev
>>
>
>




More information about the rules-dev mailing list