此内容没有您所选择的语言版本。
Chapter 13. Elements and Variables
13.1. Property Access on Java Beans (POJOs) 复制链接链接已复制到粘贴板!
复制链接链接已复制到粘贴板!
Any bean property can be used directly. A bean property is exposed using a standard Java bean getter: a method
getMyProperty()
(or isMyProperty()
for a primitive boolean) which takes no arguments and return something.
JBoss Rules uses the standard JDK
Introspector
class to do this mapping, so it follows the standard Java bean specification.
Warning
Property accessors must not change the state of the object in a way that may effect the rules. The rule engine effectively caches the results of its matching in between invocations to make it faster.