Spring Hateoas

org.springframework.hateoas.core
Class EmbeddedWrappers

java.lang.Object
  extended by org.springframework.hateoas.core.EmbeddedWrappers

public class EmbeddedWrappers
extends Object

Interface to mark objects that are aware of the rel they'd like to be exposed under.

Author:
Oliver Gierke

Constructor Summary
EmbeddedWrappers(boolean preferCollections)
          Creates a new EmbeddedWrappers.
 
Method Summary
 EmbeddedWrapper wrap(Object source)
          Creates a new EmbeddedWrapper that
 EmbeddedWrapper wrap(Object source, String rel)
          Creates a new EmbeddedWrapper with the given rel.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

EmbeddedWrappers

public EmbeddedWrappers(boolean preferCollections)
Creates a new EmbeddedWrappers.

Parameters:
preferCollections - whether wrappers for single elements should rather treat the value as collection.
Method Detail

wrap

public EmbeddedWrapper wrap(Object source)
Creates a new EmbeddedWrapper that

Parameters:
source -
Returns:

wrap

public EmbeddedWrapper wrap(Object source,
                            String rel)
Creates a new EmbeddedWrapper with the given rel.

Parameters:
source - can be null, will return null if so.
rel - must not be null or empty.
Returns:

Spring Hateoas

Copyright © 2012-2014–2014 Pivotal, Inc.. All rights reserved.