Closed sverin closed 4 years ago
The issue I had was that I could have multiple instances of the same rule but with different values. For example I have multiple price rules saved in a db. But only one PriceRule
class. But their properties defines if it evaluates to true. The normal Rules
class had a TreeSet
implemented and then only one rule instance got registered since they hade the same rule name defined in the annotation. However, by extending the Rules
class and using an ArrayList
I achieved what I wanted.
@sverin hi, let's make it simple.
Since the
RuleProxy
class has a private constructor there is no way that I can inherit and override that class. There are a reason for that I'm sure. But I would like to override the methodgetRuleName
and only that method.I can do my own implementation of the proxy by copying it and just change that method. That works since I tried it. But there is a lot of code to copy just for one small change. Is there a better way that this can be accomplished ?