Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions NOTES.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# Scopes

A Scope used as a scope and not used as a qualifier goes on the Any qualifier.

A Scope used as a qualifier goes directly on a Scopelet.

A Scope used as a "parent" scope goes on another Scope.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ changes, regardless of project version and without notice.**

# Requirements

microBean™ Scopelet requires a Java runtime of version 21 or higher.
microBean™ Scopelet requires a Java runtime of version 16 or higher.

# Installation

Expand All @@ -27,7 +27,7 @@ dependency:
<groupId>org.microbean</groupId>
<artifactId>microbean-scopelet</artifactId>
<!-- Always check https://search.maven.org/artifact/org.microbean/microbean-scopelet for up-to-date available versions. -->
<version>0.0.6</version>
<version>0.0.7</version>
</dependency>
```

Expand Down
6 changes: 3 additions & 3 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@
<java.util.logging.config.file>${project.basedir}/src/test/java/logging.properties</java.util.logging.config.file>

<!-- maven-compiler-plugin properties -->
<maven.compiler.release>23</maven.compiler.release>
<maven.compiler.release>16</maven.compiler.release>
<maven.compiler.showDeprecation>true</maven.compiler.showDeprecation>
<maven.compiler.showWarnings>true</maven.compiler.showWarnings>

Expand Down Expand Up @@ -147,7 +147,7 @@
<dependency>
<groupId>org.microbean</groupId>
<artifactId>microbean-bean</artifactId>
<version>0.0.15</version>
<version>0.0.16</version>
</dependency>

<dependency>
Expand All @@ -159,7 +159,7 @@
<dependency>
<groupId>org.microbean</groupId>
<artifactId>microbean-reference</artifactId>
<version>0.0.1</version>
<version>0.0.2</version>
</dependency>

</dependencies>
Expand Down
11 changes: 3 additions & 8 deletions src/main/java/org/microbean/scopelet/MapBackedScopelet.java
Original file line number Diff line number Diff line change
Expand Up @@ -45,15 +45,10 @@ public abstract class MapBackedScopelet<M extends MapBackedScopelet<M>> extends
/**
* Creates a new {@link MapBackedScopelet}.
*
* @param scopeId an {@link Attributes} identifying the scope this {@link MapBackedScopelet} serves; must not be
* {@code null}
*
* @exception NullPointerException if {@code scopeId} is {@code null}
*
* @see Scopelet#Scopelet(Attributes)
* @see Scopelet#Scopelet()
*/
protected MapBackedScopelet(final Attributes scopeId) {
super(scopeId);
protected MapBackedScopelet() {
super();
this.creationLocks = new ConcurrentHashMap<>();
this.instances = new ConcurrentHashMap<>();
}
Expand Down
16 changes: 1 addition & 15 deletions src/main/java/org/microbean/scopelet/NoneScopelet.java
Original file line number Diff line number Diff line change
Expand Up @@ -19,15 +19,12 @@
import java.lang.constant.DynamicConstantDesc;
import java.lang.constant.MethodHandleDesc;

import java.util.List;
import java.util.Objects;
import java.util.Optional;

import org.microbean.bean.AutoCloseableRegistry;
import org.microbean.bean.BeanTypeList;
import org.microbean.bean.DisposableReference;
import org.microbean.bean.Factory;
import org.microbean.bean.Id;
import org.microbean.bean.Request;

import org.microbean.construct.Domain;
Expand Down Expand Up @@ -56,21 +53,10 @@ public class NoneScopelet extends Scopelet<NoneScopelet> implements Constable {
* @exception NullPointerException if {@code domain} is {@code null}
*/
public NoneScopelet(final Domain domain) {
super(NONE_ID); // the scope we implement
super();
this.domain = Objects.requireNonNull(domain, "domain");
}

@Override // Scopelet<NoneScopelet>
public Id id() {
return
new Id(BeanTypeList.of(this.domain,
List.of(this.domain.declaredType(NoneScopelet.class.getCanonicalName()),
this.domain.declaredType(null,
this.domain.typeElement(Scopelet.class.getCanonicalName()),
this.domain.declaredType(NoneScopelet.class.getCanonicalName())))),
List.of(NONE_ID, anyQualifier())); // qualifiers
}

// All parameters are nullable.
// Non-final to permit subclasses to, e.g., add logging.
@Override // Scopelet<NoneScopelet>
Expand Down
Loading
Loading