Source:
protected void processListenedPropertiesAnnotation(RuleBuildContext context, PatternDescr patternDescr, Pattern pattern) { String watchedValues = null; try { Watch watch = patternDescr.getTypedAnnotation(Watch.class); watchedValues = watch == null ? null : watch.value(); } catch (Exception e) { registerDescrBuildError(context, patternDescr, e.getMessage()); } if (watchedValues == null) { return; } List<String> settableProperties = getSettableProperties(context, patternDescr, pattern); List<String> listenedProperties = new ArrayList<String>(); for (String propertyName : watchedValues.split(",")) { propertyName = propertyName.trim(); if (propertyName.equals("*") || propertyName.equals("!*")) { if (listenedProperties.contains("*") || listenedProperties.contains("!*")) { registerDescrBuildError(context, patternDescr, "Duplicate usage of wildcard * in @" + Watch.class.getSimpleName() + " annotation"); } else { listenedProperties.add(propertyName); } continue; } boolean isNegative = propertyName.startsWith("!"); propertyName = isNegative ? propertyName.substring(1).trim() : propertyName; if (settableProperties != null && !settableProperties.contains(propertyName)) { registerDescrBuildError(context, patternDescr, "Unknown property " + propertyName + " in @" + Watch.class.getSimpleName() + " annotation"); } else if (listenedProperties.contains(propertyName) || listenedProperties.contains("!" + propertyName)) { registerDescrBuildError(context, patternDescr, "Duplicate property " + propertyName + " in @" + Watch.class.getSimpleName() + " annotation"); } else { listenedProperties.add(isNegative ? "!" + propertyName : propertyName); } } KieTraitsCompiler traits = ((KnowledgeBuilderImpl) context.getKnowledgeBuilder()).getTraits(); if(traits != null && traits.isAEvaluatorPresent(pattern.getConstraints())) { listenedProperties.add(TraitableBean.TRAITSET_FIELD_NAME); } pattern.setListenedProperties(listenedProperties); }

Target:
protected void processListenedPropertiesAnnotation(RuleBuildContext context, PatternDescr patternDescr, Pattern pattern) { String watchedValues = null; try { Watch watch = patternDescr.getTypedAnnotation(Watch.class); watchedValues = watch == null ? null : watch.value(); } catch (Exception e) { registerDescrBuildError(context, patternDescr, e.getMessage()); } if (watchedValues == null) { return; } List<String> settableProperties = getSettableProperties(context, patternDescr, pattern); List<String> listenedProperties = new ArrayList<String>(); for (String propertyName : watchedValues.split(",")) { propertyName = propertyName.trim(); if (propertyName.equals("*") || propertyName.equals("!*")) { if (listenedProperties.contains("*") || listenedProperties.contains("!*")) { registerDescrBuildError(context, patternDescr, "Duplicate usage of wildcard * in @" + Watch.class.getSimpleName() + " annotation"); } else { listenedProperties.add(propertyName); } continue; } boolean isNegative = propertyName.startsWith("!"); propertyName = isNegative ? propertyName.substring(1).trim() : propertyName; if (settableProperties != null && !settableProperties.contains(propertyName)) { registerDescrBuildError(context, patternDescr, "Unknown property " + propertyName + " in @" + Watch.class.getSimpleName() + " annotation"); } else if (listenedProperties.contains(propertyName) || listenedProperties.contains("!" + propertyName)) { registerDescrBuildError(context, patternDescr, "Duplicate property " + propertyName + " in @" + Watch.class.getSimpleName() + " annotation"); } else { listenedProperties.add(isNegative ? "!" + propertyName : propertyName); } } pattern.setListenedProperties(listenedProperties); }