Interface ExportRegistry
-
public interface ExportRegistryA registry ofExports shared between scripts.Allows scripts to share persistent state, or provide a resource in a known namespace.
Some scripts will be designed to be totally stateless, and may use exports to store state between invocations.
-
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description static ExportRegistrycreate()Creates a new standaloneExportRegistry.<T> Export<T>get(String name)Gets an exportCollection<Export<?>>getAll()Returns a collection of all known exports.default <T> Export.Pointer<T>pointer(String name)Gets a pointer to an exportvoidremove(String name)Deletes an export
-
-
-
Method Detail
-
create
static ExportRegistry create()
Creates a new standaloneExportRegistry.- Returns:
- a new export registry
-
get
<T> Export<T> get(String name)
Gets an export- Type Parameters:
T- the export type- Parameters:
name- the name of the export- Returns:
- the export
-
pointer
default <T> Export.Pointer<T> pointer(String name)
Gets a pointer to an export- Type Parameters:
T- the export type- Parameters:
name- the name of the export- Returns:
- a pointer
- See Also:
Export.Pointer
-
remove
void remove(String name)
Deletes an export- Parameters:
name- the name of the export to remove.
-
getAll
Collection<Export<?>> getAll()
Returns a collection of all known exports.- Returns:
- a collection of known exports
-
-