Search in sources :

Example 1 with AccessorVisibilityChecker

use of com.webcohesion.enunciate.modules.jackson1.model.AccessorVisibilityChecker in project enunciate by stoicflame.

the class Jackson1Module method getDefaultVisibility.

public AccessorVisibilityChecker getDefaultVisibility() {
    List<HierarchicalConfiguration> visibilityElements = this.config.configurationsAt("accessor-visibility");
    AccessorVisibilityChecker checker = AccessorVisibilityChecker.DEFAULT_CHECKER;
    for (HierarchicalConfiguration visibilityElement : visibilityElements) {
        JsonMethod method = JsonMethod.valueOf(visibilityElement.getString("[@type]", "").toUpperCase());
        JsonAutoDetect.Visibility visibility = JsonAutoDetect.Visibility.valueOf(visibilityElement.getString("[@visibility]", "").toUpperCase());
        checker = checker.withVisibility(method, visibility);
    }
    return checker;
}
Also used : JsonAutoDetect(org.codehaus.jackson.annotate.JsonAutoDetect) AccessorVisibilityChecker(com.webcohesion.enunciate.modules.jackson1.model.AccessorVisibilityChecker) JsonMethod(org.codehaus.jackson.annotate.JsonMethod) HierarchicalConfiguration(org.apache.commons.configuration.HierarchicalConfiguration)

Aggregations

AccessorVisibilityChecker (com.webcohesion.enunciate.modules.jackson1.model.AccessorVisibilityChecker)1 HierarchicalConfiguration (org.apache.commons.configuration.HierarchicalConfiguration)1 JsonAutoDetect (org.codehaus.jackson.annotate.JsonAutoDetect)1 JsonMethod (org.codehaus.jackson.annotate.JsonMethod)1