if(namedFacet != null && !namedFacet.isNoop()) {
NamedFacetRepr namedFacetRepr = new NamedFacetRepr();
namedFacetRepr.value = namedFacet.value();
memberRepr.named = namedFacetRepr;
}
DisabledFacet disabledFacet = assoc.getFacet(DisabledFacet.class);
if(disabledFacet != null && !disabledFacet.isNoop()) {
DisabledFacetRepr disabledFacetRepr = new DisabledFacetRepr();
if(disabledFacet instanceof DisabledFacetImpl) {
DisabledFacetImpl disabledFacetImpl = (DisabledFacetImpl) disabledFacet;
disabledFacetRepr.reason = Strings.emptyToNull(disabledFacetImpl.getReason());
}
disabledFacetRepr.when = whenAlwaysToNull(disabledFacet.when());
disabledFacetRepr.where = whereAnywhereToNull(disabledFacet.where());
memberRepr.disabled = disabledFacetRepr;
}
HiddenFacet hiddenFacet = assoc.getFacet(HiddenFacet.class);
if(hiddenFacet != null && !hiddenFacet.isNoop()) {
HiddenFacetRepr hiddenFacetRepr = new HiddenFacetRepr();