@Test public void test_new_path_mapping() throws JsonProcessingException { assertThat(om.writeValueAsString(new Foo()), is(equalTo("{}"))); assertThat(om.writeValueAsString(new Foo().setPath(RawPath.valueOf(""))), is(equalTo("{\"path\":\"\"}"))); assertThat(om.writeValueAsString(new Foo().setPath(RawPath.valueOf("foo"))), is(equalTo("{\"path\":\"foo\"}"))); assertThat(om.writeValueAsString(new Foo().setPath(RawPath.valueOf("foo/bar"))), is(equalTo("{\"path\":\"foo/bar\"}"))); assertThat(om.writeValueAsString(new Foo().setPath(RawPath.valueOf("foo\\bar"))), is(equalTo("{\"path\":\"foo\\\\bar\"}"))); assertThat(om.readValue("{\"path\":null}", Foo.class), is(equalTo(new Foo()))); assertThat(om.readValue("{\"path\":\"\"}", Foo.class), is(equalTo(new Foo().setPath(RawPath.valueOf(""))))); assertThat(om.readValue("{\"path\":\"foo\"}", Foo.class), is(equalTo(new Foo().setPath(RawPath.valueOf("foo"))))); assertThat(om.readValue("{\"path\":\"foo/bar\"}", Foo.class), is(equalTo(new Foo().setPath(RawPath.valueOf("foo/bar"))))); assertThat(om.readValue("{\"path\":\"foo\\\\bar\"}", Foo.class), is(equalTo(new Foo().setPath(RawPath.valueOf("foo\\bar"))))); }
public static RawPath valueOf(String value) { return new RawPath(value); }
RawPath { public static RawPath valueOf(String value) { return new RawPath(value); } }
RawPath { public static RawPath valueOf(String value) { return new RawPath(value); } private  RawPath(String value); }
RawPath { public static RawPath valueOf(String value) { return new RawPath(value); } private  RawPath(String value); static RawPath valueOf(String value); String getValue(); Path toPath(); @Override String toString(); @Override boolean equals(Object o); @Override int hashCode(); RawPath append(String segments); }
RawPath { public static RawPath valueOf(String value) { return new RawPath(value); } private  RawPath(String value); static RawPath valueOf(String value); String getValue(); Path toPath(); @Override String toString(); @Override boolean equals(Object o); @Override int hashCode(); RawPath append(String segments);  }