How would you use a class with private members and no getters in any other Java application?

If you want the members of the class to influence rules you're going to have to expose them somehow.

Even if you set the global at the same time as you set the class's member you are effectively trying to use globals as a substitute for objects of your class.

If you really, really can't expose members of the class then perhaps you should:-

On 10 February 2012 10:43, ehmkey <ehmkey@gmail.com> wrote:
Hey all,

i have a class with private members and no getters. I realized my rules with
the 'global' keyword. I read that global isnt good for every case, does a a
better solution exist?

public class example {
 private int number;
 ..
 ..
}

*.drl:
package example;

global int number;

rule ....

Thank you!

--
View this message in context: http://drools.46999.n3.nabble.com/rules-user-problem-with-private-members-no-getters-tp3732106p3732106.html
Sent from the Drools: User forum mailing list archive at Nabble.com.
_______________________________________________
rules-users mailing list
rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users