DocumentBundlor { public PropertyState asPropertyState(){ List<String> includePatterns = new ArrayList<>(includes.size()); for (Include i : includes){ includePatterns.add(i.getPattern()); } return createProperty(META_PROP_PATTERN, includePatterns, STRINGS); } private  DocumentBundlor(List<Include> includes); static DocumentBundlor from(NodeState nodeState); static DocumentBundlor from(Iterable<String> includeStrings); static DocumentBundlor from(PropertyState prop); boolean isBundled(String relativePath); PropertyState asPropertyState(); Matcher createMatcher(); @Override String toString(); static final String BUNDLOR_META_PROP_PREFIX; static final String META_PROP_PATTERN; static final String META_PROP_BUNDLING_PATH; static final String HAS_CHILD_PROP_PREFIX; static final String META_PROP_BUNDLED_CHILD; static final String META_PROP_NON_BUNDLED_CHILD; static final String PROP_DISABLED; static final String PROP_PATTERN; }
@Test public void asPropertyState() throws Exception{ builder.setProperty(createProperty(PROP_PATTERN, asList("x", "x/y", "z"), STRINGS)); DocumentBundlor bundlor = DocumentBundlor.from(builder.getNodeState()); PropertyState ps = bundlor.asPropertyState(); assertNotNull(ps); DocumentBundlor bundlor2 = DocumentBundlor.from(ps); assertTrue(bundlor2.isBundled("x")); assertTrue(bundlor2.isBundled("x/y")); assertFalse(bundlor2.isBundled("m")); }