diff --git a/apidocs/allclasses-index.html b/apidocs/allclasses-index.html index 5a216cc..51ce1a3 100644 --- a/apidocs/allclasses-index.html +++ b/apidocs/allclasses-index.html @@ -1,11 +1,11 @@ - -All Classes and Interfaces (microBean™ Scopelet™ 0.0.1 API) + +All Classes and Interfaces (microBean™ Scopelet™ 0.0.2 API) - + @@ -87,7 +87,7 @@

All Classes and Interfaces< diff --git a/apidocs/allpackages-index.html b/apidocs/allpackages-index.html index d2f3785..72007ba 100644 --- a/apidocs/allpackages-index.html +++ b/apidocs/allpackages-index.html @@ -1,11 +1,11 @@ - -All Packages (microBean™ Scopelet™ 0.0.1 API) + +All Packages (microBean™ Scopelet™ 0.0.2 API) - + @@ -62,7 +62,7 @@

All Packages

diff --git a/apidocs/help-doc.html b/apidocs/help-doc.html index 6f82dc0..4d02567 100644 --- a/apidocs/help-doc.html +++ b/apidocs/help-doc.html @@ -1,11 +1,11 @@ - -API Help (microBean™ Scopelet™ 0.0.1 API) + +API Help (microBean™ Scopelet™ 0.0.2 API) - + @@ -196,7 +196,7 @@

Index

This help file applies to API documentation generated by the standard doclet. diff --git a/apidocs/index-all.html b/apidocs/index-all.html index 7b61c6d..d2f3dce 100644 --- a/apidocs/index-all.html +++ b/apidocs/index-all.html @@ -1,11 +1,11 @@ - -Index (microBean™ Scopelet™ 0.0.1 API) + +Index (microBean™ Scopelet™ 0.0.2 API) - + @@ -90,7 +90,7 @@

D

 
describeConstable() - Method in class org.microbean.scopelet.SingletonScopelet
 
-
destroy(I, AutoCloseable, ReferenceSelector) - Method in interface org.microbean.scopelet.Instance.Destructor
+
destroy(I, AutoCloseable, Creation<I>, ReferenceSelector) - Method in interface org.microbean.scopelet.Instance.Destructor
 
destroys() - Method in class org.microbean.scopelet.Scopelet
 
@@ -149,7 +149,7 @@

I

An AutoCloseable pairing of an instance that can be destroyed with a Instance.Destructor that can destroy it and an AutoCloseable that can release its dependent objects when needed.
-
Instance(I, Instance.Destructor<I>, AutoCloseable, ReferenceSelector) - Constructor for class org.microbean.scopelet.Instance
+
Instance(I, Instance.Destructor<I>, Creation<I>, ReferenceSelector) - Constructor for class org.microbean.scopelet.Instance
 
Instance.Destructor<I> - Interface in org.microbean.scopelet
 
@@ -229,7 +229,7 @@

T

A B C D E G H I M N O R S T 
All Classes and Interfaces|All Packages|Serialized Form diff --git a/apidocs/index.html b/apidocs/index.html index 8266ad1..5bd8270 100644 --- a/apidocs/index.html +++ b/apidocs/index.html @@ -1,11 +1,11 @@ - -microBean™ Scopelet™ 0.0.1 API + +microBean™ Scopelet™ 0.0.2 API - + diff --git a/apidocs/member-search-index.js b/apidocs/member-search-index.js index 407601e..5edec3c 100644 --- a/apidocs/member-search-index.js +++ b/apidocs/member-search-index.js @@ -1 +1 @@ -memberSearchIndex = [{"p":"org.microbean.scopelet","c":"Scopelet","l":"active()"},{"p":"org.microbean.scopelet","c":"Scopelet","l":"bean()"},{"p":"org.microbean.scopelet","c":"Instance","l":"close()"},{"p":"org.microbean.scopelet","c":"MapBackedScopelet","l":"close()"},{"p":"org.microbean.scopelet","c":"Scopelet","l":"close()"},{"p":"org.microbean.scopelet","c":"Instance","l":"closed()"},{"p":"org.microbean.scopelet","c":"Scopelet","l":"closed()"},{"p":"org.microbean.scopelet","c":"Scopelet","l":"containsId(Object)","u":"containsId(java.lang.Object)"},{"p":"org.microbean.scopelet","c":"Scopelet","l":"create(Creation, ReferenceSelector)","u":"create(org.microbean.bean.Creation,org.microbean.bean.ReferenceSelector)"},{"p":"org.microbean.scopelet","c":"CreationCycleDetectedException","l":"CreationCycleDetectedException()","u":"%3Cinit%3E()"},{"p":"org.microbean.scopelet","c":"NoneScopelet","l":"describeConstable()"},{"p":"org.microbean.scopelet","c":"SingletonScopelet","l":"describeConstable()"},{"p":"org.microbean.scopelet","c":"Instance.Destructor","l":"destroy(I, AutoCloseable, ReferenceSelector)","u":"destroy(I,java.lang.AutoCloseable,org.microbean.bean.ReferenceSelector)"},{"p":"org.microbean.scopelet","c":"Scopelet","l":"destroys()"},{"p":"org.microbean.scopelet","c":"Instance","l":"equals(Object)","u":"equals(java.lang.Object)"},{"p":"org.microbean.scopelet","c":"Scopelet","l":"equals(Object)","u":"equals(java.lang.Object)"},{"p":"org.microbean.scopelet","c":"Instance","l":"get()"},{"p":"org.microbean.scopelet","c":"NoneScopelet","l":"get(Object)","u":"get(java.lang.Object)"},{"p":"org.microbean.scopelet","c":"Scopelet","l":"get(Object)","u":"get(java.lang.Object)"},{"p":"org.microbean.scopelet","c":"Scopelet","l":"governedBy(NamedAttributeMap)","u":"governedBy(org.microbean.qualifier.NamedAttributeMap)"},{"p":"org.microbean.scopelet","c":"Scopelet","l":"governingScopeId()"},{"p":"org.microbean.scopelet","c":"Instance","l":"hashCode()"},{"p":"org.microbean.scopelet","c":"Scopelet","l":"hashCode()"},{"p":"org.microbean.scopelet","c":"NoneScopelet","l":"ID"},{"p":"org.microbean.scopelet","c":"SingletonScopelet","l":"ID"},{"p":"org.microbean.scopelet","c":"NoneScopelet","l":"id()"},{"p":"org.microbean.scopelet","c":"Scopelet","l":"id()"},{"p":"org.microbean.scopelet","c":"SingletonScopelet","l":"id()"},{"p":"org.microbean.scopelet","c":"InactiveScopeletException","l":"InactiveScopeletException()","u":"%3Cinit%3E()"},{"p":"org.microbean.scopelet","c":"Instance","l":"Instance(I, Instance.Destructor, AutoCloseable, ReferenceSelector)","u":"%3Cinit%3E(I,org.microbean.scopelet.Instance.Destructor,java.lang.AutoCloseable,org.microbean.bean.ReferenceSelector)"},{"p":"org.microbean.scopelet","c":"MapBackedScopelet","l":"instance(Object, Factory, Creation, ReferenceSelector)","u":"instance(java.lang.Object,org.microbean.bean.Factory,org.microbean.bean.Creation,org.microbean.bean.ReferenceSelector)"},{"p":"org.microbean.scopelet","c":"NoneScopelet","l":"instance(Object, Factory, Creation, ReferenceSelector)","u":"instance(java.lang.Object,org.microbean.bean.Factory,org.microbean.bean.Creation,org.microbean.bean.ReferenceSelector)"},{"p":"org.microbean.scopelet","c":"Scopelet","l":"instance(Object, Factory, Creation, ReferenceSelector)","u":"instance(java.lang.Object,org.microbean.bean.Factory,org.microbean.bean.Creation,org.microbean.bean.ReferenceSelector)"},{"p":"org.microbean.scopelet","c":"MapBackedScopelet","l":"MapBackedScopelet(NamedAttributeMap)","u":"%3Cinit%3E(org.microbean.qualifier.NamedAttributeMap)"},{"p":"org.microbean.scopelet","c":"NoneScopelet","l":"NoneScopelet()","u":"%3Cinit%3E()"},{"p":"org.microbean.scopelet","c":"MapBackedScopelet","l":"remove(Object)","u":"remove(java.lang.Object)"},{"p":"org.microbean.scopelet","c":"NoneScopelet","l":"remove(Object)","u":"remove(java.lang.Object)"},{"p":"org.microbean.scopelet","c":"Scopelet","l":"remove(Object)","u":"remove(java.lang.Object)"},{"p":"org.microbean.scopelet","c":"Scopelet","l":"scopeId()"},{"p":"org.microbean.scopelet","c":"Scopelet","l":"Scopelet(NamedAttributeMap)","u":"%3Cinit%3E(org.microbean.qualifier.NamedAttributeMap)"},{"p":"org.microbean.scopelet","c":"ScopeletException","l":"ScopeletException()","u":"%3Cinit%3E()"},{"p":"org.microbean.scopelet","c":"ScopeletException","l":"ScopeletException(String)","u":"%3Cinit%3E(java.lang.String)"},{"p":"org.microbean.scopelet","c":"ScopeletException","l":"ScopeletException(String, Throwable)","u":"%3Cinit%3E(java.lang.String,java.lang.Throwable)"},{"p":"org.microbean.scopelet","c":"ScopeletException","l":"ScopeletException(Throwable)","u":"%3Cinit%3E(java.lang.Throwable)"},{"p":"org.microbean.scopelet","c":"Scopelet","l":"singleton()"},{"p":"org.microbean.scopelet","c":"SingletonScopelet","l":"SingletonScopelet()","u":"%3Cinit%3E()"},{"p":"org.microbean.scopelet","c":"TooManyActiveScopeletsException","l":"TooManyActiveScopeletsException()","u":"%3Cinit%3E()"},{"p":"org.microbean.scopelet","c":"TooManyActiveScopeletsException","l":"TooManyActiveScopeletsException(String)","u":"%3Cinit%3E(java.lang.String)"},{"p":"org.microbean.scopelet","c":"TooManyActiveScopeletsException","l":"TooManyActiveScopeletsException(String, Throwable)","u":"%3Cinit%3E(java.lang.String,java.lang.Throwable)"},{"p":"org.microbean.scopelet","c":"TooManyActiveScopeletsException","l":"TooManyActiveScopeletsException(Throwable)","u":"%3Cinit%3E(java.lang.Throwable)"},{"p":"org.microbean.scopelet","c":"Instance","l":"toString()"}];updateSearchResults(); \ No newline at end of file +memberSearchIndex = [{"p":"org.microbean.scopelet","c":"Scopelet","l":"active()"},{"p":"org.microbean.scopelet","c":"Scopelet","l":"bean()"},{"p":"org.microbean.scopelet","c":"Instance","l":"close()"},{"p":"org.microbean.scopelet","c":"MapBackedScopelet","l":"close()"},{"p":"org.microbean.scopelet","c":"Scopelet","l":"close()"},{"p":"org.microbean.scopelet","c":"Instance","l":"closed()"},{"p":"org.microbean.scopelet","c":"Scopelet","l":"closed()"},{"p":"org.microbean.scopelet","c":"Scopelet","l":"containsId(Object)","u":"containsId(java.lang.Object)"},{"p":"org.microbean.scopelet","c":"Scopelet","l":"create(Creation, ReferenceSelector)","u":"create(org.microbean.bean.Creation,org.microbean.bean.ReferenceSelector)"},{"p":"org.microbean.scopelet","c":"CreationCycleDetectedException","l":"CreationCycleDetectedException()","u":"%3Cinit%3E()"},{"p":"org.microbean.scopelet","c":"NoneScopelet","l":"describeConstable()"},{"p":"org.microbean.scopelet","c":"SingletonScopelet","l":"describeConstable()"},{"p":"org.microbean.scopelet","c":"Instance.Destructor","l":"destroy(I, AutoCloseable, Creation, ReferenceSelector)","u":"destroy(I,java.lang.AutoCloseable,org.microbean.bean.Creation,org.microbean.bean.ReferenceSelector)"},{"p":"org.microbean.scopelet","c":"Scopelet","l":"destroys()"},{"p":"org.microbean.scopelet","c":"Instance","l":"equals(Object)","u":"equals(java.lang.Object)"},{"p":"org.microbean.scopelet","c":"Scopelet","l":"equals(Object)","u":"equals(java.lang.Object)"},{"p":"org.microbean.scopelet","c":"Instance","l":"get()"},{"p":"org.microbean.scopelet","c":"NoneScopelet","l":"get(Object)","u":"get(java.lang.Object)"},{"p":"org.microbean.scopelet","c":"Scopelet","l":"get(Object)","u":"get(java.lang.Object)"},{"p":"org.microbean.scopelet","c":"Scopelet","l":"governedBy(NamedAttributeMap)","u":"governedBy(org.microbean.qualifier.NamedAttributeMap)"},{"p":"org.microbean.scopelet","c":"Scopelet","l":"governingScopeId()"},{"p":"org.microbean.scopelet","c":"Instance","l":"hashCode()"},{"p":"org.microbean.scopelet","c":"Scopelet","l":"hashCode()"},{"p":"org.microbean.scopelet","c":"NoneScopelet","l":"ID"},{"p":"org.microbean.scopelet","c":"SingletonScopelet","l":"ID"},{"p":"org.microbean.scopelet","c":"NoneScopelet","l":"id()"},{"p":"org.microbean.scopelet","c":"Scopelet","l":"id()"},{"p":"org.microbean.scopelet","c":"SingletonScopelet","l":"id()"},{"p":"org.microbean.scopelet","c":"InactiveScopeletException","l":"InactiveScopeletException()","u":"%3Cinit%3E()"},{"p":"org.microbean.scopelet","c":"Instance","l":"Instance(I, Instance.Destructor, Creation, ReferenceSelector)","u":"%3Cinit%3E(I,org.microbean.scopelet.Instance.Destructor,org.microbean.bean.Creation,org.microbean.bean.ReferenceSelector)"},{"p":"org.microbean.scopelet","c":"MapBackedScopelet","l":"instance(Object, Factory, Creation, ReferenceSelector)","u":"instance(java.lang.Object,org.microbean.bean.Factory,org.microbean.bean.Creation,org.microbean.bean.ReferenceSelector)"},{"p":"org.microbean.scopelet","c":"NoneScopelet","l":"instance(Object, Factory, Creation, ReferenceSelector)","u":"instance(java.lang.Object,org.microbean.bean.Factory,org.microbean.bean.Creation,org.microbean.bean.ReferenceSelector)"},{"p":"org.microbean.scopelet","c":"Scopelet","l":"instance(Object, Factory, Creation, ReferenceSelector)","u":"instance(java.lang.Object,org.microbean.bean.Factory,org.microbean.bean.Creation,org.microbean.bean.ReferenceSelector)"},{"p":"org.microbean.scopelet","c":"MapBackedScopelet","l":"MapBackedScopelet(NamedAttributeMap)","u":"%3Cinit%3E(org.microbean.qualifier.NamedAttributeMap)"},{"p":"org.microbean.scopelet","c":"NoneScopelet","l":"NoneScopelet()","u":"%3Cinit%3E()"},{"p":"org.microbean.scopelet","c":"MapBackedScopelet","l":"remove(Object)","u":"remove(java.lang.Object)"},{"p":"org.microbean.scopelet","c":"NoneScopelet","l":"remove(Object)","u":"remove(java.lang.Object)"},{"p":"org.microbean.scopelet","c":"Scopelet","l":"remove(Object)","u":"remove(java.lang.Object)"},{"p":"org.microbean.scopelet","c":"Scopelet","l":"scopeId()"},{"p":"org.microbean.scopelet","c":"Scopelet","l":"Scopelet(NamedAttributeMap)","u":"%3Cinit%3E(org.microbean.qualifier.NamedAttributeMap)"},{"p":"org.microbean.scopelet","c":"ScopeletException","l":"ScopeletException()","u":"%3Cinit%3E()"},{"p":"org.microbean.scopelet","c":"ScopeletException","l":"ScopeletException(String)","u":"%3Cinit%3E(java.lang.String)"},{"p":"org.microbean.scopelet","c":"ScopeletException","l":"ScopeletException(String, Throwable)","u":"%3Cinit%3E(java.lang.String,java.lang.Throwable)"},{"p":"org.microbean.scopelet","c":"ScopeletException","l":"ScopeletException(Throwable)","u":"%3Cinit%3E(java.lang.Throwable)"},{"p":"org.microbean.scopelet","c":"Scopelet","l":"singleton()"},{"p":"org.microbean.scopelet","c":"SingletonScopelet","l":"SingletonScopelet()","u":"%3Cinit%3E()"},{"p":"org.microbean.scopelet","c":"TooManyActiveScopeletsException","l":"TooManyActiveScopeletsException()","u":"%3Cinit%3E()"},{"p":"org.microbean.scopelet","c":"TooManyActiveScopeletsException","l":"TooManyActiveScopeletsException(String)","u":"%3Cinit%3E(java.lang.String)"},{"p":"org.microbean.scopelet","c":"TooManyActiveScopeletsException","l":"TooManyActiveScopeletsException(String, Throwable)","u":"%3Cinit%3E(java.lang.String,java.lang.Throwable)"},{"p":"org.microbean.scopelet","c":"TooManyActiveScopeletsException","l":"TooManyActiveScopeletsException(Throwable)","u":"%3Cinit%3E(java.lang.Throwable)"},{"p":"org.microbean.scopelet","c":"Instance","l":"toString()"}];updateSearchResults(); \ No newline at end of file diff --git a/apidocs/org.microbean.scopelet/module-summary.html b/apidocs/org.microbean.scopelet/module-summary.html index 19a8a70..4385e98 100644 --- a/apidocs/org.microbean.scopelet/module-summary.html +++ b/apidocs/org.microbean.scopelet/module-summary.html @@ -1,11 +1,11 @@ - -org.microbean.scopelet (microBean™ Scopelet™ 0.0.1 API) + +org.microbean.scopelet (microBean™ Scopelet™ 0.0.2 API) - + @@ -103,7 +103,7 @@

Packages


- +
diff --git a/apidocs/org.microbean.scopelet/org/microbean/scopelet/CreationCycleDetectedException.html b/apidocs/org.microbean.scopelet/org/microbean/scopelet/CreationCycleDetectedException.html index 40d823a..65504b2 100644 --- a/apidocs/org.microbean.scopelet/org/microbean/scopelet/CreationCycleDetectedException.html +++ b/apidocs/org.microbean.scopelet/org/microbean/scopelet/CreationCycleDetectedException.html @@ -1,11 +1,11 @@ - -CreationCycleDetectedException (microBean™ Scopelet™ 0.0.1 API) + +CreationCycleDetectedException (microBean™ Scopelet™ 0.0.2 API) - + @@ -167,7 +167,7 @@

CreationCycleDetectedException


- +
diff --git a/apidocs/org.microbean.scopelet/org/microbean/scopelet/InactiveScopeletException.html b/apidocs/org.microbean.scopelet/org/microbean/scopelet/InactiveScopeletException.html index 9a2650d..142f8cf 100644 --- a/apidocs/org.microbean.scopelet/org/microbean/scopelet/InactiveScopeletException.html +++ b/apidocs/org.microbean.scopelet/org/microbean/scopelet/InactiveScopeletException.html @@ -1,11 +1,11 @@ - -InactiveScopeletException (microBean™ Scopelet™ 0.0.1 API) + +InactiveScopeletException (microBean™ Scopelet™ 0.0.2 API) - + @@ -167,7 +167,7 @@

InactiveScopeletException


- +
diff --git a/apidocs/org.microbean.scopelet/org/microbean/scopelet/Instance.Destructor.html b/apidocs/org.microbean.scopelet/org/microbean/scopelet/Instance.Destructor.html index 6f52f1a..1f674f3 100644 --- a/apidocs/org.microbean.scopelet/org/microbean/scopelet/Instance.Destructor.html +++ b/apidocs/org.microbean.scopelet/org/microbean/scopelet/Instance.Destructor.html @@ -1,11 +1,11 @@ - -Instance.Destructor (microBean™ Scopelet™ 0.0.1 API) + +Instance.Destructor (microBean™ Scopelet™ 0.0.2 API) - + @@ -94,7 +94,7 @@

Interface Instance.Destr
Instance<I>

-
public static interface Instance.Destructor<I>
+
public static interface Instance.Destructor<I>
    @@ -110,9 +110,10 @@

    Method Summary

    Method
    Description
    void
    -
    destroy(I i, +
    destroy(I i, AutoCloseable acr, - org.microbean.bean.ReferenceSelector r)
    + org.microbean.bean.Creation<I> c, + org.microbean.bean.ReferenceSelector rs)
     
    @@ -129,11 +130,12 @@

    Method Summary

    Method Details

    • -
      -

      destroy

      -
      void destroy(I i, +
      +

      destroy

      +
      void destroy(I i, AutoCloseable acr, - org.microbean.bean.ReferenceSelector r)
      + org.microbean.bean.Creation<I> c, + org.microbean.bean.ReferenceSelector rs)
    @@ -145,7 +147,7 @@


    - + diff --git a/apidocs/org.microbean.scopelet/org/microbean/scopelet/Instance.html b/apidocs/org.microbean.scopelet/org/microbean/scopelet/Instance.html index 3acb9cf..8164821 100644 --- a/apidocs/org.microbean.scopelet/org/microbean/scopelet/Instance.html +++ b/apidocs/org.microbean.scopelet/org/microbean/scopelet/Instance.html @@ -1,11 +1,11 @@ - -Instance (microBean™ Scopelet™ 0.0.1 API) + +Instance (microBean™ Scopelet™ 0.0.2 API) - + @@ -101,7 +101,7 @@

    Class Instance<I>

    AutoCloseable, Supplier<I>

    -
    public final class Instance<I> +
    public final class Instance<I> extends Object implements AutoCloseable, Supplier<I>
    An AutoCloseable pairing of an instance that can be destroyed with a Instance.Destructor that can destroy it @@ -136,9 +136,9 @@

    Constructor Summary

    Constructor
    Description
    -
    Instance(I object, +
    Instance(I object, Instance.Destructor<I> destroyer, - AutoCloseable releaser, + org.microbean.bean.Creation<I> creation, org.microbean.bean.ReferenceSelector referenceSelector)
     
    @@ -191,11 +191,11 @@

    Methods inherited from cl

    Constructor Details

    diff --git a/apidocs/org.microbean.scopelet/org/microbean/scopelet/MapBackedScopelet.html b/apidocs/org.microbean.scopelet/org/microbean/scopelet/MapBackedScopelet.html index 91bc628..6dcd6e0 100644 --- a/apidocs/org.microbean.scopelet/org/microbean/scopelet/MapBackedScopelet.html +++ b/apidocs/org.microbean.scopelet/org/microbean/scopelet/MapBackedScopelet.html @@ -1,11 +1,11 @@ - -MapBackedScopelet (microBean™ Scopelet™ 0.0.1 API) + +MapBackedScopelet (microBean™ Scopelet™ 0.0.2 API) - + @@ -96,7 +96,7 @@

    Class MapBackedScopelet<M e
    All Implemented Interfaces:
    -
    AutoCloseable, Constable, org.microbean.bean.Factory<M>, org.microbean.scope.ScopeMember
    +
    AutoCloseable, Constable, org.microbean.bean.Aggregate, org.microbean.bean.Factory<M>, org.microbean.scope.ScopeMember
    Direct Known Subclasses:
    @@ -157,7 +157,7 @@

    Methods inherited from cl clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait

    Methods inherited from interface org.microbean.bean.Factory

    -describeConstable, destroy
    +dependencies, describeConstable, destroy
@@ -227,7 +227,7 @@

close


- +
diff --git a/apidocs/org.microbean.scopelet/org/microbean/scopelet/NoneScopelet.html b/apidocs/org.microbean.scopelet/org/microbean/scopelet/NoneScopelet.html index 5071ea6..68b290a 100644 --- a/apidocs/org.microbean.scopelet/org/microbean/scopelet/NoneScopelet.html +++ b/apidocs/org.microbean.scopelet/org/microbean/scopelet/NoneScopelet.html @@ -1,11 +1,11 @@ - -NoneScopelet (microBean™ Scopelet™ 0.0.1 API) + +NoneScopelet (microBean™ Scopelet™ 0.0.2 API) - + @@ -96,7 +96,7 @@

Class NoneScopelet

All Implemented Interfaces:
-
AutoCloseable, Constable, org.microbean.bean.Factory<NoneScopelet>, org.microbean.scope.ScopeMember
+
AutoCloseable, Constable, org.microbean.bean.Aggregate, org.microbean.bean.Factory<NoneScopelet>, org.microbean.scope.ScopeMember

public final class NoneScopelet @@ -173,7 +173,7 @@

Methods inherited from cl clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait

Methods inherited from interface org.microbean.bean.Factory

-destroy
+dependencies, destroy
@@ -277,7 +277,7 @@

describeConstable


- +
diff --git a/apidocs/org.microbean.scopelet/org/microbean/scopelet/Scopelet.html b/apidocs/org.microbean.scopelet/org/microbean/scopelet/Scopelet.html index b34a8c5..19477cf 100644 --- a/apidocs/org.microbean.scopelet/org/microbean/scopelet/Scopelet.html +++ b/apidocs/org.microbean.scopelet/org/microbean/scopelet/Scopelet.html @@ -1,11 +1,11 @@ - -Scopelet (microBean™ Scopelet™ 0.0.1 API) + +Scopelet (microBean™ Scopelet™ 0.0.2 API) - + @@ -94,7 +94,7 @@

Class Scopelet<S extends Scopelet<
All Implemented Interfaces:
-
AutoCloseable, Constable, org.microbean.bean.Factory<S>, org.microbean.scope.ScopeMember
+
AutoCloseable, Constable, org.microbean.bean.Aggregate, org.microbean.bean.Factory<S>, org.microbean.scope.ScopeMember
Direct Known Subclasses:
@@ -196,7 +196,7 @@

Methods inherited from cl clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait

Methods inherited from interface org.microbean.bean.Factory

-describeConstable, destroy
+dependencies, describeConstable, destroy

@@ -369,7 +369,7 @@

closed


- +
diff --git a/apidocs/org.microbean.scopelet/org/microbean/scopelet/ScopeletException.html b/apidocs/org.microbean.scopelet/org/microbean/scopelet/ScopeletException.html index e989c7a..6682b64 100644 --- a/apidocs/org.microbean.scopelet/org/microbean/scopelet/ScopeletException.html +++ b/apidocs/org.microbean.scopelet/org/microbean/scopelet/ScopeletException.html @@ -1,11 +1,11 @@ - -ScopeletException (microBean™ Scopelet™ 0.0.1 API) + +ScopeletException (microBean™ Scopelet™ 0.0.2 API) - + @@ -195,7 +195,7 @@

ScopeletException


- +
diff --git a/apidocs/org.microbean.scopelet/org/microbean/scopelet/SingletonScopelet.html b/apidocs/org.microbean.scopelet/org/microbean/scopelet/SingletonScopelet.html index de89bc8..d7de284 100644 --- a/apidocs/org.microbean.scopelet/org/microbean/scopelet/SingletonScopelet.html +++ b/apidocs/org.microbean.scopelet/org/microbean/scopelet/SingletonScopelet.html @@ -1,11 +1,11 @@ - -SingletonScopelet (microBean™ Scopelet™ 0.0.1 API) + +SingletonScopelet (microBean™ Scopelet™ 0.0.2 API) - + @@ -98,7 +98,7 @@

Class SingletonScopelet

All Implemented Interfaces:
-
AutoCloseable, Constable, org.microbean.bean.Factory<SingletonScopelet>, org.microbean.scope.ScopeMember
+
AutoCloseable, Constable, org.microbean.bean.Aggregate, org.microbean.bean.Factory<SingletonScopelet>, org.microbean.scope.ScopeMember

public final class SingletonScopelet @@ -166,7 +166,7 @@

Methods inherited from cl clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait

Methods inherited from interface org.microbean.bean.Factory

-destroy
+dependencies, destroy
@@ -237,7 +237,7 @@

describeConstable


- +
diff --git a/apidocs/org.microbean.scopelet/org/microbean/scopelet/TooManyActiveScopeletsException.html b/apidocs/org.microbean.scopelet/org/microbean/scopelet/TooManyActiveScopeletsException.html index 0cf2825..104763a 100644 --- a/apidocs/org.microbean.scopelet/org/microbean/scopelet/TooManyActiveScopeletsException.html +++ b/apidocs/org.microbean.scopelet/org/microbean/scopelet/TooManyActiveScopeletsException.html @@ -1,11 +1,11 @@ - -TooManyActiveScopeletsException (microBean™ Scopelet™ 0.0.1 API) + +TooManyActiveScopeletsException (microBean™ Scopelet™ 0.0.2 API) - + @@ -193,7 +193,7 @@

TooManyActiveScopeletsException


- +
diff --git a/apidocs/org.microbean.scopelet/org/microbean/scopelet/class-use/CreationCycleDetectedException.html b/apidocs/org.microbean.scopelet/org/microbean/scopelet/class-use/CreationCycleDetectedException.html index f4109d0..ce93661 100644 --- a/apidocs/org.microbean.scopelet/org/microbean/scopelet/class-use/CreationCycleDetectedException.html +++ b/apidocs/org.microbean.scopelet/org/microbean/scopelet/class-use/CreationCycleDetectedException.html @@ -1,11 +1,11 @@ - -Uses of Class org.microbean.scopelet.CreationCycleDetectedException (microBean™ Scopelet™ 0.0.1 API) + +Uses of Class org.microbean.scopelet.CreationCycleDetectedException (microBean™ Scopelet™ 0.0.2 API) - + @@ -55,7 +55,7 @@


- +
diff --git a/apidocs/org.microbean.scopelet/org/microbean/scopelet/class-use/InactiveScopeletException.html b/apidocs/org.microbean.scopelet/org/microbean/scopelet/class-use/InactiveScopeletException.html index 72b3ca1..c5e1dfb 100644 --- a/apidocs/org.microbean.scopelet/org/microbean/scopelet/class-use/InactiveScopeletException.html +++ b/apidocs/org.microbean.scopelet/org/microbean/scopelet/class-use/InactiveScopeletException.html @@ -1,11 +1,11 @@ - -Uses of Class org.microbean.scopelet.InactiveScopeletException (microBean™ Scopelet™ 0.0.1 API) + +Uses of Class org.microbean.scopelet.InactiveScopeletException (microBean™ Scopelet™ 0.0.2 API) - + @@ -55,7 +55,7 @@


- +
diff --git a/apidocs/org.microbean.scopelet/org/microbean/scopelet/class-use/Instance.Destructor.html b/apidocs/org.microbean.scopelet/org/microbean/scopelet/class-use/Instance.Destructor.html index aa11d92..d78fa8c 100644 --- a/apidocs/org.microbean.scopelet/org/microbean/scopelet/class-use/Instance.Destructor.html +++ b/apidocs/org.microbean.scopelet/org/microbean/scopelet/class-use/Instance.Destructor.html @@ -1,11 +1,11 @@ - -Uses of Interface org.microbean.scopelet.Instance.Destructor (microBean™ Scopelet™ 0.0.1 API) + +Uses of Interface org.microbean.scopelet.Instance.Destructor (microBean™ Scopelet™ 0.0.2 API) - + @@ -63,9 +63,9 @@

Uses of Constructor
Description
 
-
Instance(I object, +
Instance(I object, Instance.Destructor<I> destroyer, - AutoCloseable releaser, + org.microbean.bean.Creation<I> creation, org.microbean.bean.ReferenceSelector referenceSelector)
 
@@ -76,7 +76,7 @@

Uses of
-
+ diff --git a/apidocs/org.microbean.scopelet/org/microbean/scopelet/class-use/Instance.html b/apidocs/org.microbean.scopelet/org/microbean/scopelet/class-use/Instance.html index 2de3450..8af2e84 100644 --- a/apidocs/org.microbean.scopelet/org/microbean/scopelet/class-use/Instance.html +++ b/apidocs/org.microbean.scopelet/org/microbean/scopelet/class-use/Instance.html @@ -1,11 +1,11 @@ - -Uses of Class org.microbean.scopelet.Instance (microBean™ Scopelet™ 0.0.1 API) + +Uses of Class org.microbean.scopelet.Instance (microBean™ Scopelet™ 0.0.2 API) - + @@ -55,7 +55,7 @@

Uses of No usage of org.microbean.scopelet.Instance

- +
diff --git a/apidocs/org.microbean.scopelet/org/microbean/scopelet/class-use/MapBackedScopelet.html b/apidocs/org.microbean.scopelet/org/microbean/scopelet/class-use/MapBackedScopelet.html index 337d089..2f21049 100644 --- a/apidocs/org.microbean.scopelet/org/microbean/scopelet/class-use/MapBackedScopelet.html +++ b/apidocs/org.microbean.scopelet/org/microbean/scopelet/class-use/MapBackedScopelet.html @@ -1,11 +1,11 @@ - -Uses of Class org.microbean.scopelet.MapBackedScopelet (microBean™ Scopelet™ 0.0.1 API) + +Uses of Class org.microbean.scopelet.MapBackedScopelet (microBean™ Scopelet™ 0.0.2 API) - + @@ -82,7 +82,7 @@

Uses of
-
+ diff --git a/apidocs/org.microbean.scopelet/org/microbean/scopelet/class-use/NoneScopelet.html b/apidocs/org.microbean.scopelet/org/microbean/scopelet/class-use/NoneScopelet.html index 19c3f9f..4330f42 100644 --- a/apidocs/org.microbean.scopelet/org/microbean/scopelet/class-use/NoneScopelet.html +++ b/apidocs/org.microbean.scopelet/org/microbean/scopelet/class-use/NoneScopelet.html @@ -1,11 +1,11 @@ - -Uses of Class org.microbean.scopelet.NoneScopelet (microBean™ Scopelet™ 0.0.1 API) + +Uses of Class org.microbean.scopelet.NoneScopelet (microBean™ Scopelet™ 0.0.2 API) - + @@ -73,7 +73,7 @@

Uses of
-
+ diff --git a/apidocs/org.microbean.scopelet/org/microbean/scopelet/class-use/Scopelet.html b/apidocs/org.microbean.scopelet/org/microbean/scopelet/class-use/Scopelet.html index d659fc6..1f3d979 100644 --- a/apidocs/org.microbean.scopelet/org/microbean/scopelet/class-use/Scopelet.html +++ b/apidocs/org.microbean.scopelet/org/microbean/scopelet/class-use/Scopelet.html @@ -1,11 +1,11 @@ - -Uses of Class org.microbean.scopelet.Scopelet (microBean™ Scopelet™ 0.0.1 API) + +Uses of Class org.microbean.scopelet.Scopelet (microBean™ Scopelet™ 0.0.2 API) - + @@ -88,7 +88,7 @@

Uses of S diff --git a/apidocs/org.microbean.scopelet/org/microbean/scopelet/class-use/ScopeletException.html b/apidocs/org.microbean.scopelet/org/microbean/scopelet/class-use/ScopeletException.html index 11f2fb7..e251463 100644 --- a/apidocs/org.microbean.scopelet/org/microbean/scopelet/class-use/ScopeletException.html +++ b/apidocs/org.microbean.scopelet/org/microbean/scopelet/class-use/ScopeletException.html @@ -1,11 +1,11 @@ - -Uses of Class org.microbean.scopelet.ScopeletException (microBean™ Scopelet™ 0.0.1 API) + +Uses of Class org.microbean.scopelet.ScopeletException (microBean™ Scopelet™ 0.0.2 API) - + @@ -79,7 +79,7 @@

Uses of
-
+ diff --git a/apidocs/org.microbean.scopelet/org/microbean/scopelet/class-use/SingletonScopelet.html b/apidocs/org.microbean.scopelet/org/microbean/scopelet/class-use/SingletonScopelet.html index f67297a..885ae3d 100644 --- a/apidocs/org.microbean.scopelet/org/microbean/scopelet/class-use/SingletonScopelet.html +++ b/apidocs/org.microbean.scopelet/org/microbean/scopelet/class-use/SingletonScopelet.html @@ -1,11 +1,11 @@ - -Uses of Class org.microbean.scopelet.SingletonScopelet (microBean™ Scopelet™ 0.0.1 API) + +Uses of Class org.microbean.scopelet.SingletonScopelet (microBean™ Scopelet™ 0.0.2 API) - + @@ -73,7 +73,7 @@

Uses of
-
+ diff --git a/apidocs/org.microbean.scopelet/org/microbean/scopelet/class-use/TooManyActiveScopeletsException.html b/apidocs/org.microbean.scopelet/org/microbean/scopelet/class-use/TooManyActiveScopeletsException.html index 3aaa014..b0e150e 100644 --- a/apidocs/org.microbean.scopelet/org/microbean/scopelet/class-use/TooManyActiveScopeletsException.html +++ b/apidocs/org.microbean.scopelet/org/microbean/scopelet/class-use/TooManyActiveScopeletsException.html @@ -1,11 +1,11 @@ - -Uses of Class org.microbean.scopelet.TooManyActiveScopeletsException (microBean™ Scopelet™ 0.0.1 API) + +Uses of Class org.microbean.scopelet.TooManyActiveScopeletsException (microBean™ Scopelet™ 0.0.2 API) - + @@ -55,7 +55,7 @@


- +
diff --git a/apidocs/org.microbean.scopelet/org/microbean/scopelet/package-summary.html b/apidocs/org.microbean.scopelet/org/microbean/scopelet/package-summary.html index 1860118..dbbe7bb 100644 --- a/apidocs/org.microbean.scopelet/org/microbean/scopelet/package-summary.html +++ b/apidocs/org.microbean.scopelet/org/microbean/scopelet/package-summary.html @@ -1,11 +1,11 @@ - -org.microbean.scopelet (microBean™ Scopelet™ 0.0.1 API) + +org.microbean.scopelet (microBean™ Scopelet™ 0.0.2 API) - + @@ -113,7 +113,7 @@

Package org.microbean.s

- +
diff --git a/apidocs/org.microbean.scopelet/org/microbean/scopelet/package-tree.html b/apidocs/org.microbean.scopelet/org/microbean/scopelet/package-tree.html index 79eaa10..34ff4fd 100644 --- a/apidocs/org.microbean.scopelet/org/microbean/scopelet/package-tree.html +++ b/apidocs/org.microbean.scopelet/org/microbean/scopelet/package-tree.html @@ -1,11 +1,11 @@ - -org.microbean.scopelet Class Hierarchy (microBean™ Scopelet™ 0.0.1 API) + +org.microbean.scopelet Class Hierarchy (microBean™ Scopelet™ 0.0.2 API) - + @@ -100,7 +100,7 @@

Interface Hierarchy


- +
diff --git a/apidocs/org.microbean.scopelet/org/microbean/scopelet/package-use.html b/apidocs/org.microbean.scopelet/org/microbean/scopelet/package-use.html index 5784aec..0fc9188 100644 --- a/apidocs/org.microbean.scopelet/org/microbean/scopelet/package-use.html +++ b/apidocs/org.microbean.scopelet/org/microbean/scopelet/package-use.html @@ -1,11 +1,11 @@ - -Uses of Package org.microbean.scopelet (microBean™ Scopelet™ 0.0.1 API) + +Uses of Package org.microbean.scopelet (microBean™ Scopelet™ 0.0.2 API) - + @@ -80,7 +80,7 @@

Uses of Package

- +
diff --git a/apidocs/overview-tree.html b/apidocs/overview-tree.html index b6fa511..f5d211b 100644 --- a/apidocs/overview-tree.html +++ b/apidocs/overview-tree.html @@ -1,11 +1,11 @@ - -Class Hierarchy (microBean™ Scopelet™ 0.0.1 API) + +Class Hierarchy (microBean™ Scopelet™ 0.0.2 API) - + @@ -104,7 +104,7 @@

Interface Hierarchy


- +
diff --git a/apidocs/search.html b/apidocs/search.html index 517683e..7ac94e4 100644 --- a/apidocs/search.html +++ b/apidocs/search.html @@ -1,11 +1,11 @@ - -Search (microBean™ Scopelet™ 0.0.1 API) + +Search (microBean™ Scopelet™ 0.0.2 API) - + @@ -70,7 +70,7 @@

Search


- +
diff --git a/apidocs/serialized-form.html b/apidocs/serialized-form.html index 0b89700..0e230c7 100644 --- a/apidocs/serialized-form.html +++ b/apidocs/serialized-form.html @@ -1,11 +1,11 @@ - -Serialized Form (microBean™ Scopelet™ 0.0.1 API) + +Serialized Form (microBean™ Scopelet™ 0.0.2 API) - + @@ -104,7 +104,7 @@

Exception Class 
-
+ diff --git a/apidocs/src-html/org.microbean.scopelet/org/microbean/scopelet/Instance.Destructor.html b/apidocs/src-html/org.microbean.scopelet/org/microbean/scopelet/Instance.Destructor.html index 6a410a5..0e21d89 100644 --- a/apidocs/src-html/org.microbean.scopelet/org/microbean/scopelet/Instance.Destructor.html +++ b/apidocs/src-html/org.microbean.scopelet/org/microbean/scopelet/Instance.Destructor.html @@ -14,7 +14,7 @@
001/* -*- mode: Java; c-basic-offset: 2; indent-tabs-mode: nil; coding: utf-8-unix -*-
 002 *
-003 * Copyright © 2023 microBean™.
+003 * Copyright © 2023–2024 microBean™.
 004 *
 005 * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with
 006 * the License.  You may obtain a copy of the License at
@@ -34,129 +34,142 @@
 020
 021import java.util.function.Supplier;
 022
-023import org.microbean.bean.ReferenceSelector;
-024
-025/**
-026 * An {@link AutoCloseable} pairing of an instance that can be destroyed with a {@link Destructor} that can destroy it
-027 * and an {@link AutoCloseable} that can release its dependent objects when needed.
-028 *
-029 * @param <I> the type of the instance
-030 *
-031 * @author <a href="https://about.me/lairdnelson" target="_parent">Laird Nelson</a>
-032 */
-033public final class Instance<I> implements AutoCloseable, Supplier<I> {
-034
-035  private static final VarHandle CLOSED;
-036
-037  static {
-038    try {
-039      CLOSED = MethodHandles.lookup().findVarHandle(Instance.class, "closed", boolean.class);
-040    } catch (final NoSuchFieldException | IllegalAccessException reflectiveOperationException) {
-041      throw (Error)new ExceptionInInitializerError(reflectiveOperationException.getMessage()).initCause(reflectiveOperationException);
-042    }
-043  }
-044
-045  private final I object;
-046
-047  private final AutoCloseable releaser;
-048
-049  private final Destructor<I> destroyer;
-050
-051  private final ReferenceSelector referenceSelector;
-052
-053  private volatile boolean closed;
-054
-055  public Instance(final I object,
-056                  final Destructor<I> destroyer,
-057                  final AutoCloseable releaser,
-058                  final ReferenceSelector referenceSelector) {
-059    super();
-060    this.object = object;
-061    this.releaser = releaser;
-062    this.destroyer = destroyer;
-063    this.referenceSelector = referenceSelector;
-064  }
-065
-066  @Override
-067  public final I get() {
-068    if (this.closed()) {
-069      throw new IllegalStateException("closed");
-070    }
-071    return this.object;
-072  }
-073
-074  @Override
-075  public final void close() {
-076    if (CLOSED.compareAndSet(this, false, true)) { // volatile read/write
-077      RuntimeException t = null;
-078      try {
-079        if (this.destroyer != null) {
-080          this.destroyer.destroy(this.object, this.releaser, this.referenceSelector);
-081        }
-082      } catch (final RuntimeException e) {
-083        t = e;
-084      } finally {
-085        if (this.releaser != null) {
-086          try {
-087            this.releaser.close();
-088          } catch (final RuntimeException | Error e) {
-089            if (t == null) {
-090              throw e;
-091            }
-092            t.addSuppressed(e);
-093          } catch (final Exception e) {
-094            if (e instanceof InterruptedException) {
-095              Thread.currentThread().interrupt();
-096            }
-097            if (t == null) {
-098              throw new ScopeletException(e.getMessage(), e);
-099            }
-100            t.addSuppressed(e);
-101          }
-102        }
-103      }
-104      if (t != null) {
-105        throw t;
-106      }
-107    }
-108  }
-109
-110  public final boolean closed() {
-111    return this.closed; // volatile read
-112  }
-113
-114  @Override
-115  public final int hashCode() {
-116    // We don't want "closedness" to factor in here because it isn't part of equals().  But we want to use the results
-117    // of get().  Fortunately, that method is final.  So we can just use direct field access.
-118    return this.object.hashCode();
-119  }
-120
-121  @Override
-122  public final boolean equals(final Object other) {
-123    if (other == this) {
-124      return true;
-125    } else if (other != null && this.getClass() == other.getClass()) {
-126      // We don't want "closedness" to factor in here because it isn't part of hashCode().  But we want to use the
-127      // results of get().  Fortunately, that method is final.  So we can just use direct field access.
-128      return Objects.equals(this.object, ((Instance<?>)other).object);
-129    } else {
-130      return false;
-131    }
+023import org.microbean.bean.Creation;
+024import org.microbean.bean.ReferenceSelector;
+025
+026/**
+027 * An {@link AutoCloseable} pairing of an instance that can be destroyed with a {@link Destructor} that can destroy it
+028 * and an {@link AutoCloseable} that can release its dependent objects when needed.
+029 *
+030 * @param <I> the type of the instance
+031 *
+032 * @author <a href="https://about.me/lairdnelson" target="_parent">Laird Nelson</a>
+033 */
+034public final class Instance<I> implements AutoCloseable, Supplier<I> {
+035
+036  private static final VarHandle CLOSED;
+037
+038  static {
+039    try {
+040      CLOSED = MethodHandles.lookup().findVarHandle(Instance.class, "closed", boolean.class);
+041    } catch (final NoSuchFieldException | IllegalAccessException reflectiveOperationException) {
+042      throw (Error)new ExceptionInInitializerError(reflectiveOperationException.getMessage()).initCause(reflectiveOperationException);
+043    }
+044  }
+045
+046  private final I object;
+047
+048  private final Destructor<I> destroyer;
+049
+050  private final AutoCloseable releaser;
+051
+052  private final Creation<I> creation;
+053
+054  private final ReferenceSelector referenceSelector;
+055
+056  private volatile boolean closed;
+057
+058  public Instance(final I object,
+059                  final Destructor<I> destroyer,
+060                  final Creation<I> creation,
+061                  final ReferenceSelector referenceSelector) {
+062    this(object, destroyer, creation, creation, referenceSelector);
+063  }
+064
+065  private Instance(final I object,
+066                   final Destructor<I> destroyer,
+067                   final AutoCloseable releaser, // often the same object as creation
+068                   final Creation<I> creation, // often the same object as releaser
+069                   final ReferenceSelector referenceSelector) {
+070    super();
+071    // All of these things are nullable on purpose.
+072    this.object = object;
+073    this.releaser = releaser;
+074    this.destroyer = destroyer;
+075    this.creation = creation;
+076    this.referenceSelector = referenceSelector;
+077  }
+078
+079  @Override
+080  public final I get() {
+081    if (this.closed()) {
+082      throw new IllegalStateException("closed");
+083    }
+084    return this.object;
+085  }
+086
+087  @Override
+088  public final void close() {
+089    if (CLOSED.compareAndSet(this, false, true)) { // volatile read/write
+090      RuntimeException t = null;
+091      try {
+092        if (this.destroyer != null) {
+093          this.destroyer.destroy(this.object, this.releaser, this.creation, this.referenceSelector);
+094        }
+095      } catch (final RuntimeException e) {
+096        t = e;
+097      } finally {
+098        if (this.releaser != null) {
+099          try {
+100            this.releaser.close();
+101          } catch (final RuntimeException | Error e) {
+102            if (t == null) {
+103              throw e;
+104            }
+105            t.addSuppressed(e);
+106          } catch (final Exception e) {
+107            if (e instanceof InterruptedException) {
+108              Thread.currentThread().interrupt();
+109            }
+110            if (t == null) {
+111              throw new ScopeletException(e.getMessage(), e);
+112            }
+113            t.addSuppressed(e);
+114          }
+115        }
+116      }
+117      if (t != null) {
+118        throw t;
+119      }
+120    }
+121  }
+122
+123  public final boolean closed() {
+124    return this.closed; // volatile read
+125  }
+126
+127  @Override
+128  public final int hashCode() {
+129    // We don't want "closedness" to factor in here because it isn't part of equals().  But we want to use the results
+130    // of get().  Fortunately, that method is final.  So we can just use direct field access.
+131    return this.object.hashCode();
 132  }
 133
 134  @Override
-135  public final String toString() {
-136    return String.valueOf(this.get());
-137  }
-138
-139  public static interface Destructor<I> {
-140
-141    public void destroy(final I i, final AutoCloseable acr, final ReferenceSelector r);
-142
-143  }
-144
-145}
+135  public final boolean equals(final Object other) {
+136    if (other == this) {
+137      return true;
+138    } else if (other != null && this.getClass() == other.getClass()) {
+139      // We don't want "closedness" to factor in here because it isn't part of hashCode().  But we want to use the
+140      // results of get().  Fortunately, that method is final.  So we can just use direct field access.
+141      return Objects.equals(this.object, ((Instance<?>)other).object);
+142    } else {
+143      return false;
+144    }
+145  }
+146
+147  @Override
+148  public final String toString() {
+149    return String.valueOf(this.get());
+150  }
+151
+152  public static interface Destructor<I> {
+153
+154    public void destroy(final I i, final AutoCloseable acr, final Creation<I> c, final ReferenceSelector rs);
+155
+156  }
+157
+158}
 
 
 
diff --git a/apidocs/src-html/org.microbean.scopelet/org/microbean/scopelet/Instance.html b/apidocs/src-html/org.microbean.scopelet/org/microbean/scopelet/Instance.html
index 1d2d80e..f0b8321 100644
--- a/apidocs/src-html/org.microbean.scopelet/org/microbean/scopelet/Instance.html
+++ b/apidocs/src-html/org.microbean.scopelet/org/microbean/scopelet/Instance.html
@@ -14,7 +14,7 @@
 
001/* -*- mode: Java; c-basic-offset: 2; indent-tabs-mode: nil; coding: utf-8-unix -*-
 002 *
-003 * Copyright © 2023 microBean™.
+003 * Copyright © 2023–2024 microBean™.
 004 *
 005 * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with
 006 * the License.  You may obtain a copy of the License at
@@ -34,129 +34,142 @@
 020
 021import java.util.function.Supplier;
 022
-023import org.microbean.bean.ReferenceSelector;
-024
-025/**
-026 * An {@link AutoCloseable} pairing of an instance that can be destroyed with a {@link Destructor} that can destroy it
-027 * and an {@link AutoCloseable} that can release its dependent objects when needed.
-028 *
-029 * @param <I> the type of the instance
-030 *
-031 * @author <a href="https://about.me/lairdnelson" target="_parent">Laird Nelson</a>
-032 */
-033public final class Instance<I> implements AutoCloseable, Supplier<I> {
-034
-035  private static final VarHandle CLOSED;
-036
-037  static {
-038    try {
-039      CLOSED = MethodHandles.lookup().findVarHandle(Instance.class, "closed", boolean.class);
-040    } catch (final NoSuchFieldException | IllegalAccessException reflectiveOperationException) {
-041      throw (Error)new ExceptionInInitializerError(reflectiveOperationException.getMessage()).initCause(reflectiveOperationException);
-042    }
-043  }
-044
-045  private final I object;
-046
-047  private final AutoCloseable releaser;
-048
-049  private final Destructor<I> destroyer;
-050
-051  private final ReferenceSelector referenceSelector;
-052
-053  private volatile boolean closed;
-054
-055  public Instance(final I object,
-056                  final Destructor<I> destroyer,
-057                  final AutoCloseable releaser,
-058                  final ReferenceSelector referenceSelector) {
-059    super();
-060    this.object = object;
-061    this.releaser = releaser;
-062    this.destroyer = destroyer;
-063    this.referenceSelector = referenceSelector;
-064  }
-065
-066  @Override
-067  public final I get() {
-068    if (this.closed()) {
-069      throw new IllegalStateException("closed");
-070    }
-071    return this.object;
-072  }
-073
-074  @Override
-075  public final void close() {
-076    if (CLOSED.compareAndSet(this, false, true)) { // volatile read/write
-077      RuntimeException t = null;
-078      try {
-079        if (this.destroyer != null) {
-080          this.destroyer.destroy(this.object, this.releaser, this.referenceSelector);
-081        }
-082      } catch (final RuntimeException e) {
-083        t = e;
-084      } finally {
-085        if (this.releaser != null) {
-086          try {
-087            this.releaser.close();
-088          } catch (final RuntimeException | Error e) {
-089            if (t == null) {
-090              throw e;
-091            }
-092            t.addSuppressed(e);
-093          } catch (final Exception e) {
-094            if (e instanceof InterruptedException) {
-095              Thread.currentThread().interrupt();
-096            }
-097            if (t == null) {
-098              throw new ScopeletException(e.getMessage(), e);
-099            }
-100            t.addSuppressed(e);
-101          }
-102        }
-103      }
-104      if (t != null) {
-105        throw t;
-106      }
-107    }
-108  }
-109
-110  public final boolean closed() {
-111    return this.closed; // volatile read
-112  }
-113
-114  @Override
-115  public final int hashCode() {
-116    // We don't want "closedness" to factor in here because it isn't part of equals().  But we want to use the results
-117    // of get().  Fortunately, that method is final.  So we can just use direct field access.
-118    return this.object.hashCode();
-119  }
-120
-121  @Override
-122  public final boolean equals(final Object other) {
-123    if (other == this) {
-124      return true;
-125    } else if (other != null && this.getClass() == other.getClass()) {
-126      // We don't want "closedness" to factor in here because it isn't part of hashCode().  But we want to use the
-127      // results of get().  Fortunately, that method is final.  So we can just use direct field access.
-128      return Objects.equals(this.object, ((Instance<?>)other).object);
-129    } else {
-130      return false;
-131    }
+023import org.microbean.bean.Creation;
+024import org.microbean.bean.ReferenceSelector;
+025
+026/**
+027 * An {@link AutoCloseable} pairing of an instance that can be destroyed with a {@link Destructor} that can destroy it
+028 * and an {@link AutoCloseable} that can release its dependent objects when needed.
+029 *
+030 * @param <I> the type of the instance
+031 *
+032 * @author <a href="https://about.me/lairdnelson" target="_parent">Laird Nelson</a>
+033 */
+034public final class Instance<I> implements AutoCloseable, Supplier<I> {
+035
+036  private static final VarHandle CLOSED;
+037
+038  static {
+039    try {
+040      CLOSED = MethodHandles.lookup().findVarHandle(Instance.class, "closed", boolean.class);
+041    } catch (final NoSuchFieldException | IllegalAccessException reflectiveOperationException) {
+042      throw (Error)new ExceptionInInitializerError(reflectiveOperationException.getMessage()).initCause(reflectiveOperationException);
+043    }
+044  }
+045
+046  private final I object;
+047
+048  private final Destructor<I> destroyer;
+049
+050  private final AutoCloseable releaser;
+051
+052  private final Creation<I> creation;
+053
+054  private final ReferenceSelector referenceSelector;
+055
+056  private volatile boolean closed;
+057
+058  public Instance(final I object,
+059                  final Destructor<I> destroyer,
+060                  final Creation<I> creation,
+061                  final ReferenceSelector referenceSelector) {
+062    this(object, destroyer, creation, creation, referenceSelector);
+063  }
+064
+065  private Instance(final I object,
+066                   final Destructor<I> destroyer,
+067                   final AutoCloseable releaser, // often the same object as creation
+068                   final Creation<I> creation, // often the same object as releaser
+069                   final ReferenceSelector referenceSelector) {
+070    super();
+071    // All of these things are nullable on purpose.
+072    this.object = object;
+073    this.releaser = releaser;
+074    this.destroyer = destroyer;
+075    this.creation = creation;
+076    this.referenceSelector = referenceSelector;
+077  }
+078
+079  @Override
+080  public final I get() {
+081    if (this.closed()) {
+082      throw new IllegalStateException("closed");
+083    }
+084    return this.object;
+085  }
+086
+087  @Override
+088  public final void close() {
+089    if (CLOSED.compareAndSet(this, false, true)) { // volatile read/write
+090      RuntimeException t = null;
+091      try {
+092        if (this.destroyer != null) {
+093          this.destroyer.destroy(this.object, this.releaser, this.creation, this.referenceSelector);
+094        }
+095      } catch (final RuntimeException e) {
+096        t = e;
+097      } finally {
+098        if (this.releaser != null) {
+099          try {
+100            this.releaser.close();
+101          } catch (final RuntimeException | Error e) {
+102            if (t == null) {
+103              throw e;
+104            }
+105            t.addSuppressed(e);
+106          } catch (final Exception e) {
+107            if (e instanceof InterruptedException) {
+108              Thread.currentThread().interrupt();
+109            }
+110            if (t == null) {
+111              throw new ScopeletException(e.getMessage(), e);
+112            }
+113            t.addSuppressed(e);
+114          }
+115        }
+116      }
+117      if (t != null) {
+118        throw t;
+119      }
+120    }
+121  }
+122
+123  public final boolean closed() {
+124    return this.closed; // volatile read
+125  }
+126
+127  @Override
+128  public final int hashCode() {
+129    // We don't want "closedness" to factor in here because it isn't part of equals().  But we want to use the results
+130    // of get().  Fortunately, that method is final.  So we can just use direct field access.
+131    return this.object.hashCode();
 132  }
 133
 134  @Override
-135  public final String toString() {
-136    return String.valueOf(this.get());
-137  }
-138
-139  public static interface Destructor<I> {
-140
-141    public void destroy(final I i, final AutoCloseable acr, final ReferenceSelector r);
-142
-143  }
-144
-145}
+135  public final boolean equals(final Object other) {
+136    if (other == this) {
+137      return true;
+138    } else if (other != null && this.getClass() == other.getClass()) {
+139      // We don't want "closedness" to factor in here because it isn't part of hashCode().  But we want to use the
+140      // results of get().  Fortunately, that method is final.  So we can just use direct field access.
+141      return Objects.equals(this.object, ((Instance<?>)other).object);
+142    } else {
+143      return false;
+144    }
+145  }
+146
+147  @Override
+148  public final String toString() {
+149    return String.valueOf(this.get());
+150  }
+151
+152  public static interface Destructor<I> {
+153
+154    public void destroy(final I i, final AutoCloseable acr, final Creation<I> c, final ReferenceSelector rs);
+155
+156  }
+157
+158}
 
 
 
diff --git a/apidocs/src-html/org.microbean.scopelet/org/microbean/scopelet/NoneScopelet.html b/apidocs/src-html/org.microbean.scopelet/org/microbean/scopelet/NoneScopelet.html
index b31beda..aeca73b 100644
--- a/apidocs/src-html/org.microbean.scopelet/org/microbean/scopelet/NoneScopelet.html
+++ b/apidocs/src-html/org.microbean.scopelet/org/microbean/scopelet/NoneScopelet.html
@@ -14,7 +14,7 @@
 
001/* -*- mode: Java; c-basic-offset: 2; indent-tabs-mode: nil; coding: utf-8-unix -*-
 002 *
-003 * Copyright © 2023 microBean™.
+003 * Copyright © 2023–2024 microBean™.
 004 *
 005 * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with
 006 * the License.  You may obtain a copy of the License at
@@ -97,7 +97,7 @@
 083    final I returnValue = factory.create(c, r);
 084    if (factory.destroys()) {
 085      if (useDisposableReferences) {
-086        new DisposableReference<>(returnValue, referent -> factory.destroy(referent, c, r));
+086        new DisposableReference<>(returnValue, referent -> factory.destroy(referent, c, c, r));
 087      } else if (c instanceof AutoCloseableRegistry acr) {
 088        acr.register(new Instance<>(returnValue, factory::destroy, c, r));
 089      }
diff --git a/checkstyle.html b/checkstyle.html
index 75da6ff..2273470 100644
--- a/checkstyle.html
+++ b/checkstyle.html
@@ -1,6 +1,6 @@
 
 
 
@@ -27,8 +27,8 @@
 
         
       
@@ -106,7 +106,7 @@ 

Files

org/microbean/scopelet/NoneScopelet.java 0 0 -3 +4 org/microbean/scopelet/Scopelet.java 0 @@ -126,7 +126,7 @@

Files

org/microbean/scopelet/TooManyActiveScopeletsException.java 0 0 -6
+5

Rules

@@ -217,25 +217,25 @@

org/microbean/scope

- + - + - + -
javadoc MissingJavadocMethod Missing a Javadoc comment.55
58
 Error javadoc MissingJavadocMethod Missing a Javadoc comment.110
123
 Error javadoc MissingJavadocType Missing a Javadoc comment.139
152
 Error javadoc MissingJavadocMethod Missing a Javadoc comment.141
+154

org/microbean/scopelet/MapBackedScopelet.java

@@ -261,16 +261,22 @@

org/microbean/s

+ + + + + + - + - + @@ -419,34 +425,28 @@

- - - - - - - + - + - + - + @@ -459,7 +459,7 @@

diff --git a/dependencies.html b/dependencies.html index 560ba45..72fc076 100644 --- a/dependencies.html +++ b/dependencies.html @@ -1,6 +1,6 @@ @@ -27,8 +27,8 @@ @@ -84,7 +84,7 @@

compile

- + @@ -152,7 +152,7 @@

compile

- + @@ -164,7 +164,7 @@

compile

- +
 Error javadocJavadocPackageMissing package-info.java file.1
 Errorjavadoc MissingJavadocType Missing a Javadoc comment. 41
 Error javadoc JavadocVariable Missing a Javadoc comment. 43
 Error javadoc MissingJavadocMethod
 Error javadocJavadocPackageMissing package-info.java file.1
 Errorjavadoc MissingJavadocType Missing a Javadoc comment. 16
 Error javadoc MissingJavadocMethod Missing a Javadoc comment. 20
 Error javadoc MissingJavadocMethod Missing a Javadoc comment. 24
 Error javadoc MissingJavadocMethod Missing a Javadoc comment. 28
 Error javadoc MissingJavadocMethod
org.microbean microbean-bean0.0.20.0.5 jar Apache License 2.0
org.microbean microbean-interceptor0.2.10.2.3 jar Apache License 2.0
org.microbean microbean-lang0.0.80.0.12 jar Apache License 2.0

test

@@ -223,7 +223,7 @@

Project Dependency Graph

Dependency Tree

-
  • org.microbean:microbean-lang:jar:0.0.8 (compile) [Information]
  • org.microbean:microbean-lang:jar:0.0.12 (compile) [Information]