@Test public void merge_pathPrune() throws Exception { StringWriter sw = new StringWriter(); builder.get(B.class).writeTo(b, new NamedPathPruner("z,y"), Flavor.JSON.createDataWriter(b, sw, config)); assertEquals("{'_class':'B','y':20,'z':30}", sw.toString().replace('"','\'')); }
public void writeTo(T object, DataWriter writer) throws IOException { writeTo(object, 0, writer); }
Model { public void writeTo(T object, DataWriter writer) throws IOException { writeTo(object, 0, writer); } }
Model { public void writeTo(T object, DataWriter writer) throws IOException { writeTo(object, 0, writer); } Model(ModelBuilder parent, Class<T> type, @CheckForNull Class<?> propertyOwner, @Nullable String property); }
Model { public void writeTo(T object, DataWriter writer) throws IOException { writeTo(object, 0, writer); } Model(ModelBuilder parent, Class<T> type, @CheckForNull Class<?> propertyOwner, @Nullable String property); List<Property> getProperties(); void writeTo(T object, DataWriter writer); void writeTo(T object, TreePruner pruner, DataWriter writer); @Deprecated void writeTo(T object, int baseVisibility, DataWriter writer); }
Model { public void writeTo(T object, DataWriter writer) throws IOException { writeTo(object, 0, writer); } Model(ModelBuilder parent, Class<T> type, @CheckForNull Class<?> propertyOwner, @Nullable String property); List<Property> getProperties(); void writeTo(T object, DataWriter writer); void writeTo(T object, TreePruner pruner, DataWriter writer); @Deprecated void writeTo(T object, int baseVisibility, DataWriter writer); final Class<T> type; final Model<? super T> superModel; }