public class EmbeddedWrappers extends Object
Constructor and Description |
---|
EmbeddedWrappers(boolean preferCollections)
Creates a new
EmbeddedWrappers . |
Modifier and Type | Method and Description |
---|---|
EmbeddedWrapper |
emptyCollectionOf(Class<?> type)
Creates an
EmbeddedWrapper for an empty Collection with the given element type. |
EmbeddedWrapper |
wrap(Object source)
Creates a new
EmbeddedWrapper that |
EmbeddedWrapper |
wrap(Object source,
String rel)
Creates a new
EmbeddedWrapper with the given rel. |
public EmbeddedWrappers(boolean preferCollections)
EmbeddedWrappers
.preferCollections
- whether wrappers for single elements should rather treat the value as collection.public EmbeddedWrapper wrap(Object source)
EmbeddedWrapper
thatsource
- public EmbeddedWrapper emptyCollectionOf(Class<?> type)
EmbeddedWrapper
for an empty Collection
with the given element type.type
- must not be null.public EmbeddedWrapper wrap(Object source, String rel)
EmbeddedWrapper
with the given rel.source
- can be null, will return null if so.rel
- must not be null or empty.Copyright © 2012-2016–2018 Pivotal, Inc.. All rights reserved.