T
- expected type of the resolved reference objectpublic final class LazyReference<T> extends Object
JsonValue
reference node against a provided Heap
instance.
Once the reference has been acquired, no other resolution is tried (except for optional references resolved
to null
).Modifier and Type | Method and Description |
---|---|
T |
get()
Resolves the encapsulated reference.
|
static <R> LazyReference<R> |
newReference(Heap heap,
org.forgerock.json.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, org.forgerock.json.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 © 2025 Open Identity Platform Community. All rights reserved.