T
- expected type of the resolved reference objectpublic final class LazyReference<T> extends Object
Modifier and Type | Method and Description |
---|---|
T |
get()
Resolves the encapsulated reference.
|
static <R> LazyReference<R> |
newReference(Heap heap,
JsonValue reference,
Class<R> type,
boolean optional)
Builds a LazyReference dedicated to resolve the given (optional or not)
reference of type type
from the given heap . |
public static <R> LazyReference<R> newReference(Heap heap, JsonValue reference, Class<R> type, boolean optional)
reference
of type type
from the given heap
.R
- expected resolved type of the referenceheap
- Heap instance that will try to resolve the referencereference
- Reference to be resolved (can be an inline declaration)type
- expected resolved type of the referenceoptional
- is this reference optional (return null
if the given reference
wraps a null
value)public T get() throws HeapException
null
if it was optional and not set.HeapException
- if resolution failed, this error is the one thrown be the heap, untouched.Copyright 2011-2015 ForgeRock AS.