@ParametersAreNonnullByDefault public interface SoyValueProvider
This allows for adding providers of late-resolved values (e.g. Futures) to records/maps/lists that are only resolved if the values are actually retrieved. Note that each Soy value object should itself be a provider (of itself).
Important: Until this API is more stable and this note is removed, users must not define classes that implement this interface.
| Modifier and Type | Interface and Description |
|---|---|
static class |
SoyValueProvider.ResolveStatus
A value that indicates whether
resolve() can be called without
blocking. |
| Modifier and Type | Method and Description |
|---|---|
boolean |
equals(SoyValueProvider other)
Compares this value against another for equality for the purposes of Soy.
|
SoyValue |
resolve()
Usually, this method is a no-op that simply returns this object.
|
SoyValueProvider.ResolveStatus |
status()
Returns
SoyValueProvider.ResolveStatus.isReady() if the value provider can be
resolved without blocking on a future. |
@Nonnull SoyValue resolve()
@Nonnull SoyValueProvider.ResolveStatus status()
SoyValueProvider.ResolveStatus.isReady() if the value provider can be
resolved without blocking on a future. Otherwise, returns a
SoyValueProvider.ResolveStatus that holds the future.
Note, once this method returns SoyValueProvider.ResolveStatus.isReady() all future calls must also
return SoyValueProvider.ResolveStatus.isReady().
boolean equals(SoyValueProvider other)
other - The other value to compare against.