@PublicApi public static interface StructureGenerator.GenerationContext extends StructureGenerator.Context
Modifier and Type | Method and Description |
---|---|
void |
addItemChangeFilter(ItemChangeFilter filter)
Detect future changes those may affect the forest with
ItemChangeFilter |
void |
addUpdateChecker(UpdateChecker checker)
Detect future changes those may affect the forest with
UpdateChecker |
ForestSpec |
getForestSpec()
Returns the forest spec of the forest being generated.
|
ForestSpec |
getForestSpecBeingTransformed() |
<T> T |
getObject(Object key)
Retrieves the object previously associated with the given forest by this generator.
|
<T> T |
getTempObject(Object key)
Retrieves the object previously associated with this context by this generator.
|
ItemForest |
inputForest()
Returns the forest fragment generated before current generator call.
|
boolean |
isStopped()
Checks if current generation process is stopped
|
ItemVersionUpdate |
itemsUpdate()
Returns the item version update since the last time the current forest was generated.
|
ItemVersionUpdate |
itemsUpdate(DataVersion sinceVersion)
Returns the item version update since the given version.
|
ItemForest |
previewForest()
Returns the forest fragment currently processed by the generator.
|
void |
putObject(Object key,
Object value)
Associate an object with the current forest.
|
void |
putTempObject(Object key,
Object value)
Associate an object with this context.
|
void addItemChangeFilter(ItemChangeFilter filter)
ItemChangeFilter
filter
- the filter to detect changesvoid addUpdateChecker(UpdateChecker checker)
UpdateChecker
checker
- the checker to detect changes@NotNull ItemForest previewForest()
@Nullable ItemForest inputForest()
@Nullable ForestSpec getForestSpecBeingTransformed()
@NotNull ItemVersionUpdate itemsUpdate()
@NotNull ItemVersionUpdate itemsUpdate(DataVersion sinceVersion)
sinceVersion
- item data versionvoid putObject(@Nullable Object key, @Nullable Object value)
key
- the keyvalue
- the valuegetObject(Object)
@Nullable <T> T getObject(@Nullable Object key)
null
if the generated forest was evicted from cache or its internal
caches were cleared.T
- result typekey
- the keyputObject(Object, Object)
void putTempObject(@Nullable Object key, @Nullable Object value)
putObject(Object, Object)
,
the object will be available to this generator only during the current regeneration.key
- the keyvalue
- the valuegetTempObject(Object)
,
putObject(Object, Object)
@Nullable <T> T getTempObject(@Nullable Object key)
T
- result typekey
- the keyputTempObject(Object, Object)
@NotNull ForestSpec getForestSpec()
boolean isStopped()
Copyright © 2024 Tempo Software. All Rights Reserved.