public class ConstructionContext<T>
extends java.lang.Object
Constructor and Description |
---|
ConstructionContext(java.lang.Object cookie) |
Modifier and Type | Method and Description |
---|---|
StructuredArray<T> |
getArray()
Get the immediately containing StructuredArray.
|
ConstructionContext<StructuredArray<T>> |
getContainingContext()
Get the containing context.
|
java.lang.Object |
getContextCookie()
Get the construction context cookie object.The construction context cookie of the outermost
array is taken from the (optionally supplied) StructuredArrayBuilder used in instantiating
the array (via
StructuredArrayBuilder.getContextCookie() ). |
long |
getIndex()
Get the index (of the element being constructed) in the immediately containing StructuredArray.
|
public long getIndex()
public StructuredArray<T> getArray()
public ConstructionContext<StructuredArray<T>> getContainingContext()
public java.lang.Object getContextCookie()
StructuredArrayBuilder.getContextCookie()
). The
construction context cookie for nested arrays (if those exist) is taken from the CtorAndArgs
used to construct the nested array, such that a CtorAndArgsProvider
can receive
and propagate an appropriate contextCookie. A good example of context cookie in use can be found in the
implementation of CopyCtorAndArgsProvider
.