calculateMask(analyzedCondition, settableProperties) :
calculateMaskFromExpression(settableProperties);
}
private BitMask calculateMaskFromExpression(List<String> settableProperties) {
BitMask mask = getEmptyPropertyReactiveMask(settableProperties.size());
String[] simpleExpressions = expression.split("\\Q&&\\E|\\Q||\\E");
for (String simpleExpression : simpleExpressions) {
String propertyName = getPropertyNameFromSimpleExpression(simpleExpression);
if (propertyName.length() == 0) {
continue;
}
if (propertyName.equals("this")) {
return allSetButTraitBitMask();
}
int pos = settableProperties.indexOf(propertyName);
if (pos < 0 && Character.isUpperCase(propertyName.charAt(0))) {
propertyName = propertyName.substring(0, 1).toLowerCase() + propertyName.substring(1);
pos = settableProperties.indexOf(propertyName);
}
if (pos >= 0) { // Ignore not settable properties
mask = mask.set(pos + PropertySpecificUtil.CUSTOM_BITS_OFFSET);
}
}
return mask;
}