@Test public void greedyLabelsMustBeLastLabelInPattern() { Throwable thrown = Assertions.assertThrows(InvalidPatternException.class, () -> { String target = "/{foo+}/{baz}"; SmithyPattern.builder() .segments(parser(target)) .pattern(target) .build(); }); assertThat(thrown.getMessage(), containsString("A greedy label must be the last label in its pattern")); }
public static Builder builder() { return new Builder(); }
SmithyPattern { public static Builder builder() { return new Builder(); } }
SmithyPattern { public static Builder builder() { return new Builder(); } protected  SmithyPattern(Builder builder); }
SmithyPattern { public static Builder builder() { return new Builder(); } protected  SmithyPattern(Builder builder); final List<Segment> getSegments(); final List<Segment> getLabels(); final Optional<Segment> getLabel(String name); final Optional<Segment> getGreedyLabel(); @Override String toString(); @Override boolean equals(Object other); @Override int hashCode(); static Builder builder(); }
SmithyPattern { public static Builder builder() { return new Builder(); } protected  SmithyPattern(Builder builder); final List<Segment> getSegments(); final List<Segment> getLabels(); final Optional<Segment> getLabel(String name); final Optional<Segment> getGreedyLabel(); @Override String toString(); @Override boolean equals(Object other); @Override int hashCode(); static Builder builder();  }