@Test public void testResolveRole() { String dimensionName = "dim"; String roleName = "role"; _ctxtB.setNodeRoleDimensions( ImmutableSortedSet.of( NodeRoleDimension.builder() .setName(dimensionName) .setRoleDimensionMappings( ImmutableList.of( new RoleDimensionMapping( "(node1.*)", null, ImmutableMap.of("node1", roleName)))) .build())); assertThat( new ParboiledNodeSpecifier(new RoleNodeAstNode(dimensionName, roleName)) .resolve(_ctxtB.build()), equalTo(ImmutableSet.of("node1"))); }
@Override public Set<String> resolve(SpecifierContext ctxt) { return _ast.accept(new NodeAstNodeToNodes(ctxt)); }
ParboiledNodeSpecifier implements NodeSpecifier { @Override public Set<String> resolve(SpecifierContext ctxt) { return _ast.accept(new NodeAstNodeToNodes(ctxt)); } }
ParboiledNodeSpecifier implements NodeSpecifier { @Override public Set<String> resolve(SpecifierContext ctxt) { return _ast.accept(new NodeAstNodeToNodes(ctxt)); } ParboiledNodeSpecifier(NodeAstNode ast); }
ParboiledNodeSpecifier implements NodeSpecifier { @Override public Set<String> resolve(SpecifierContext ctxt) { return _ast.accept(new NodeAstNodeToNodes(ctxt)); } ParboiledNodeSpecifier(NodeAstNode ast); static ParboiledNodeSpecifier parse(String input); @Override boolean equals(Object o); @Override int hashCode(); @Override Set<String> resolve(SpecifierContext ctxt); }
ParboiledNodeSpecifier implements NodeSpecifier { @Override public Set<String> resolve(SpecifierContext ctxt) { return _ast.accept(new NodeAstNodeToNodes(ctxt)); } ParboiledNodeSpecifier(NodeAstNode ast); static ParboiledNodeSpecifier parse(String input); @Override boolean equals(Object o); @Override int hashCode(); @Override Set<String> resolve(SpecifierContext ctxt);  }