Class Instance<I>
java.lang.Object
org.microbean.scopelet.Instance<I>
- Type Parameters:
I- the contextual instance type
- All Implemented Interfaces:
AutoCloseable,Supplier<I>
An
AutoCloseable pairing of a contextual instance that can be destroyed with a Instance.Destructor that can
destroy it and a Destruction view of the Creation that caused it to be created.- Author:
- Laird Nelson
- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic interfaceAn interface whose implementations can destroy contextual instances. -
Constructor Summary
ConstructorsConstructorDescriptionInstance(I contextualInstance, Instance.Destructor<I> destructor, Destruction destruction) Creates a newInstance. -
Method Summary
-
Constructor Details
-
Instance
Creates a newInstance.- Parameters:
contextualInstance- a contextual instance that has just been created; may benulldestructor- aInstance.Destructorcapable of (eventually) destroying the suppliedcontextualInstance; may benulldestruction- aDestruction; may benull
-
-
Method Details
-
close
- Specified by:
closein interfaceAutoCloseable
-
closed
-
equals
-
get
-
hashCode
-
toString
-