use of org.drools.model.BitMask in project drools by kiegroup.
the class BitMaskUtil method calculatePatternMask.
public static BitMask calculatePatternMask(Class<?> clazz, Collection<String> listenedProperties) {
List<String> accessibleProperties = getAccessibleProperties(clazz);
if (listenedProperties == null) {
return EmptyBitMask.get();
}
BitMask mask = getEmptyPropertyReactiveMask(accessibleProperties.size());
if (listenedProperties.contains(TRAITSET_FIELD_NAME)) {
if (listenedProperties.contains(TRAITSET_FIELD_NAME)) {
mask = mask.set(TRAITABLE_BIT);
}
}
for (String propertyName : listenedProperties) {
if (propertyName.equals("*")) {
return AllSetBitMask.get();
}
mask = setPropertyOnMask(mask, accessibleProperties, propertyName);
}
return mask;
}
Aggregations