public void configure()

in jackson2/src/java/org/apache/fulcrum/json/jackson/Jackson2MapperService.java [613:680]


    public void configure(Configuration conf) throws ConfigurationException {
        getLogger().debug("conf.getName()" + conf.getName());
        this.annotationInspectors = new HashMap<>();

        final Configuration configuredAnnotationInspectors = conf.getChild(ANNOTATIONINSPECTOR, false);

        if (configuredAnnotationInspectors != null) {
            Configuration[] nameVal = configuredAnnotationInspectors.getChildren();
            Arrays.stream( nameVal).forEach(c->
            {
                String key = c.getName();
                getLogger().debug("configured key: " + key);
                if (key.equals("features")) {
                    this.features = new HashMap<>();
                    this.featureTypes = new HashMap<>();
                    Arrays.stream( c.getChildren() ).forEach( lf -> {
                        boolean featureValue = lf.getAttributeAsBoolean("value", false);
                        String featureType = null;
                        String feature = null;
                        try {
                            featureType = lf.getAttribute("type");
                            feature = lf.getValue();
                            getLogger().debug("configuredAnnotationInspectors " + feature + ":" + featureValue);
                            this.features.put(feature, featureValue);
                            this.featureTypes.put(feature, featureType);
                        } catch (ConfigurationException e) {
                            throw new RuntimeException(e);
                        }
                    });
                } else {
                    String val;
                    try {
                        val = c.getValue();
                        getLogger().debug("configuredAnnotationInspectors " + key + ":" + val);
                        this.annotationInspectors.put(key, val);
                    } catch (ConfigurationException e) {
                        throw new RuntimeException(e);
                    }

                }
            });
        }
        final Configuration configuredDateFormat = conf.getChild(DATE_FORMAT, true);
        this.dateFormat = configuredDateFormat.getValue(DEFAULTDATEFORMAT);

        final Configuration configuredKeepFilter = conf.getChild(CACHE_FILTERS, false);
        if (configuredKeepFilter != null) {
            setCacheFilters( configuredKeepFilter.getValueAsBoolean());
        }
        final Configuration configuredEscapeChars = conf.getChild(ESCAPE_CHARS, false);
        if (configuredEscapeChars != null) {
            this.escapeCharsGlobal = configuredEscapeChars.getValueAsBoolean();
        }
        final Configuration configuredEscapeCharClass = conf.getChild(ESCAPE_CHAR_CLASS, false);
        if (configuredEscapeCharClass != null) {
            this.escapeCharsClass = configuredEscapeCharClass.getValue();
        }

        final Configuration configuredDefaultType = conf.getChild(DEFAULT_TYPING, false);
        if (configuredDefaultType != null) {
            defaultTypeDefs = new String[] { configuredDefaultType.getAttribute("type"),
                    configuredDefaultType.getAttribute("key") };
        }
        final Configuration configuredjsonPath = conf.getChild(USE_JSON_PATH, false);
        if (configuredjsonPath != null) {
            this.useJsonPath = configuredjsonPath.getValueAsBoolean();
        }
    }