@Test public void config_string() { assertEquals("${ident}", new IdentifierNameResolver(IDENTIFIER) .configString().toString()); assertEquals("${ident[0]}", new IdentifierNameResolver(IDENTIFIER, Optional.of(new SubSelectIndex(0))) .configString().toString()); assertEquals("${ident[-1]}", new IdentifierNameResolver(IDENTIFIER, Optional.of(new SubSelectIndex(-1))) .configString().toString()); assertEquals("${ident}", new IdentifierNameResolver(IDENTIFIER, Optional.of(new SubSelectRange(Optional.empty(), Optional.empty()))) .configString().toString()); assertEquals("${ident[-1:]}", new IdentifierNameResolver(IDENTIFIER, Optional.of(new SubSelectRange(Optional.of(-1), Optional.empty()))) .configString().toString()); assertEquals("${ident[1:]}", new IdentifierNameResolver(IDENTIFIER, Optional.of(new SubSelectRange(Optional.of(1), Optional.empty()))) .configString().toString()); assertEquals("${ident[:-1]}", new IdentifierNameResolver(IDENTIFIER, Optional.of(new SubSelectRange(Optional.empty(), Optional.of(-1)))) .configString().toString()); assertEquals("${ident[:2]}", new IdentifierNameResolver(IDENTIFIER, Optional.of(new SubSelectRange(Optional.empty(), Optional.of(2)))) .configString().toString()); assertEquals("${ident[-2:-1]}", new IdentifierNameResolver(IDENTIFIER, Optional.of(new SubSelectRange(Optional.of(-2), Optional.of(-1)))) .configString().toString()); assertEquals("${ident[1:2]}", new IdentifierNameResolver(IDENTIFIER, Optional.of(new SubSelectRange(Optional.of(1), Optional.of(2)))) .configString().toString()); }
@Override public StringBuilder configString() { return new StringBuilder() .append("${") .append(identifier_) .append(sub_select_.map(SubSelect::configString).orElseGet(StringBuilder::new)) .append("}"); }
IdentifierNameResolver implements NameResolver { @Override public StringBuilder configString() { return new StringBuilder() .append("${") .append(identifier_) .append(sub_select_.map(SubSelect::configString).orElseGet(StringBuilder::new)) .append("}"); } }
IdentifierNameResolver implements NameResolver { @Override public StringBuilder configString() { return new StringBuilder() .append("${") .append(identifier_) .append(sub_select_.map(SubSelect::configString).orElseGet(StringBuilder::new)) .append("}"); } IdentifierNameResolver(String identifier, Optional<SubSelect> sub_select);  IdentifierNameResolver(String identifier); }
IdentifierNameResolver implements NameResolver { @Override public StringBuilder configString() { return new StringBuilder() .append("${") .append(identifier_) .append(sub_select_.map(SubSelect::configString).orElseGet(StringBuilder::new)) .append("}"); } IdentifierNameResolver(String identifier, Optional<SubSelect> sub_select);  IdentifierNameResolver(String identifier); @Override Optional<Path> apply(Context<?> ctx); @Override StringBuilder configString(); @Override List<PathMatcher.IdentifierMatch> asLiteral(); @Override int hashCode(); @Override boolean equals(Object obj); }
IdentifierNameResolver implements NameResolver { @Override public StringBuilder configString() { return new StringBuilder() .append("${") .append(identifier_) .append(sub_select_.map(SubSelect::configString).orElseGet(StringBuilder::new)) .append("}"); } IdentifierNameResolver(String identifier, Optional<SubSelect> sub_select);  IdentifierNameResolver(String identifier); @Override Optional<Path> apply(Context<?> ctx); @Override StringBuilder configString(); @Override List<PathMatcher.IdentifierMatch> asLiteral(); @Override int hashCode(); @Override boolean equals(Object obj);  }