This commit is contained in:
Phillip Webb
2017-04-17 22:08:51 -07:00
parent 3fe0b844a6
commit f46d799f31
8 changed files with 37 additions and 24 deletions

View File

@@ -113,6 +113,10 @@ public abstract class AbstractJsonMarshalTester<T> {
return this.type;
}
/**
* Return class used to load relative resources.
* @return the resource load class
*/
protected final Class<?> getResourceLoadClass() {
return this.resourceLoadClass;
}

View File

@@ -152,13 +152,14 @@ public class JacksonTester<T> extends AbstractJsonMarshalTester<T> {
}
/**
* Returns a new instance of {@link JacksonTester} with the view
* that should be used for json serialization/deserialization.
* Returns a new instance of {@link JacksonTester} with the view that should be used
* for json serialization/deserialization.
* @param view the view class
* @return the new instance
*/
public JacksonTester<T> forView(Class<?> view) {
return new JacksonTester<T>(this.getResourceLoadClass(), this.getType(), this.objectMapper, view);
return new JacksonTester<T>(this.getResourceLoadClass(), this.getType(),
this.objectMapper, view);
}
/**