public Resource getChildResource()

in src/main/java/org/apache/sling/jmx/provider/impl/AttributeResource.java [177:196]


    public Resource getChildResource(final String subPath) {
        final Map<String, Object> childStructure = this.convertData();
        if ( childStructure != null ) {
            final String[] segments = subPath.split("/");
            Map<String, Object> current = childStructure;
            for(final String path : segments) {
                final Object child = current.get(path);
                if ( child == null ) {
                    return null;
                }
                if ( !(child instanceof Map) ) {
                    return null;
                }
                current = (Map<String, Object>)child;
            }

            return new MapResource(this.getResourceResolver(), this.getPath(), current, this);
        }
        return null;
    }