@CheckForNull
    @Override
    public CNode describe(T instance, ConfigurationContext context) {
        Predicate<CNode> isScalar = node -> node.getType().equals(MAPPING)
                && unchecked(node::asMapping).apply().size() == 0;
        return lookupConfigurator(context, instance.getClass())
                .map(configurator -> convertToNode(context, configurator, instance))
                .filter(Objects::nonNull)
                .map(node -> {
                    if (isScalar.test(node)) {
                        return new Scalar(preferredSymbol(instance.getDescriptor()));
                    } else {
                        final Mapping mapping = new Mapping();
                        mapping.put(preferredSymbol(instance.getDescriptor()), node);
                        return mapping;
                    }
                })
                .getOrNull();
    }
{@link Configurator} that works with {@link Describable} subtype as a {@link #target}.

<p>
The configuration object will be specify the 'short name' which we use to resolve to a specific
subtype of {@link #target}. For example, if {@link #target} is {@link SecurityRealm} and the short name
is 'local', we resolve to {@link HudsonPrivateSecurityRealm} (because it has {@link Symbol} annotation that
specifies that name.

<p>
The corresponding {@link Configurator} will be then invoked to configure the chosen subtype.

@author <a href="mailto:nicolas.deloof@gmail.com">Nicolas De Loof</a>
plugin/src/main/java/io/jenkins/plugins/casc/impl/configurators/HeteroDescribableConfigurator.java