/**
* Constructor function that creates field condition logic from method annotations.
*/
static FieldConditionLogic readLogic(Method m) throws JsonProtocolModelParseException {
List<FieldConditionLogic> results = new ArrayList<FieldConditionLogic>(1);
JsonSubtypeConditionBoolValue boolValueAnn =
m.getAnnotation(JsonSubtypeConditionBoolValue.class);
if (boolValueAnn != null) {
final Boolean required = boolValueAnn.value();
results.add(new FieldConditionLogic(true) {
@Override
boolean checkValue(boolean hasValue, Object unparsedValue, QuickParser<?> parser)
throws JsonProtocolParseException {
return hasValue && required == parser.parseValueQuick(unparsedValue);