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
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.5</version>
<version>0.0.6</version>
</dependency>
```

Expand Down
65 changes: 23 additions & 42 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@
<!-- maven-javadoc-plugin properties -->
<bottom><![CDATA[Copyright &copy; ${project.inceptionYear}&ndash;{currentYear}, <a href="${project.organization.url}" target="_top">${project.organization.name}</a>. All rights reserved.]]></bottom>
<doctitle>&lt;a href="${project.url}" target="_top"&gt;&lt;span style="font-family:Lobster, cursive;"&gt;µb&lt;/span&gt; ${project.artifactId}&lt;/a&gt; ${project.version}</doctitle>
<links>https://microbean.github.io/microbean-bean/apidocs/,https://microbean.github.io/microbean-construct/apidocs/,https://microbean.github.io/microbean-qualifier/apidocs/,https://microbean.github.io/microbean-scope/apidocs/</links>
<links>https://microbean.github.io/microbean-assign/apidocs/,https://microbean.github.io/microbean-attributes/apidocs/,https://microbean.github.io/microbean-bean/apidocs/,https://microbean.github.io/microbean-construct/apidocs/,https://microbean.github.io/microbean-reference/apidocs/</links>
<sourcetab>2</sourcetab>

<!-- maven-release-plugin properties -->
Expand Down Expand Up @@ -125,7 +125,7 @@
<dependency>
<groupId>org.junit</groupId>
<artifactId>junit-bom</artifactId>
<version>5.11.3</version>
<version>5.11.4</version>
<type>pom</type>
<scope>import</scope>
</dependency>
Expand All @@ -135,19 +135,19 @@
<dependency>
<groupId>org.microbean</groupId>
<artifactId>microbean-assign</artifactId>
<version>0.0.1</version>
<version>0.0.5</version>
</dependency>

<dependency>
<groupId>org.microbean</groupId>
<artifactId>microbean-bean</artifactId>
<version>0.0.13</version>
<artifactId>microbean-attributes</artifactId>
<version>0.0.2</version>
</dependency>

<dependency>
<groupId>org.microbean</groupId>
<artifactId>microbean-constant</artifactId>
<version>0.0.7</version>
<artifactId>microbean-bean</artifactId>
<version>0.0.15</version>
</dependency>

<dependency>
Expand All @@ -158,14 +158,8 @@

<dependency>
<groupId>org.microbean</groupId>
<artifactId>microbean-qualifier</artifactId>
<version>0.2.4</version>
</dependency>

<dependency>
<groupId>org.microbean</groupId>
<artifactId>microbean-scope</artifactId>
<version>0.0.3</version>
<artifactId>microbean-reference</artifactId>
<version>0.0.1</version>
</dependency>

</dependencies>
Expand All @@ -181,34 +175,28 @@

<dependency>
<groupId>org.microbean</groupId>
<artifactId>microbean-bean</artifactId>
<scope>compile</scope>
</dependency>

<dependency>
<groupId>org.microbean</groupId>
<artifactId>microbean-constant</artifactId>
<artifactId>microbean-attributes</artifactId>
<scope>compile</scope>
</dependency>

<dependency>
<groupId>org.microbean</groupId>
<artifactId>microbean-construct</artifactId>
<artifactId>microbean-bean</artifactId>
<scope>compile</scope>
</dependency>

<dependency>
<groupId>org.microbean</groupId>
<artifactId>microbean-qualifier</artifactId>
<artifactId>microbean-construct</artifactId>
<scope>compile</scope>
</dependency>

<dependency>
<groupId>org.microbean</groupId>
<artifactId>microbean-scope</artifactId>
<artifactId>microbean-reference</artifactId>
<scope>compile</scope>
</dependency>

<!-- Test-scoped dependencies. -->

<dependency>
Expand All @@ -222,7 +210,7 @@
<artifactId>junit-jupiter-engine</artifactId>
<scope>test</scope>
</dependency>

</dependencies>

<build>
Expand All @@ -240,7 +228,7 @@
<artifactId>maven-checkstyle-plugin</artifactId>
<version>3.6.0</version>
<configuration>
<checkstyleRules>
<checkstyleRules>
<module name="Checker">
<module name="BeforeExecutionExclusionFileFilter">
<property name="fileNamePattern" value="module\-info\.java$" />
Expand Down Expand Up @@ -350,7 +338,7 @@
</plugin>
<plugin>
<artifactId>maven-clean-plugin</artifactId>
<version>3.4.0</version>
<version>3.4.1</version>
<configuration>
<filesets>
<fileset>
Expand All @@ -365,28 +353,21 @@
</plugin>
<plugin>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.13.0</version>
<version>3.14.0</version>
<configuration>
<compilerArgs>
<arg>-Xlint:all</arg>
<arg>-parameters</arg>
</compilerArgs>
</configuration>
<dependencies>
<dependency>
<groupId>org.codehaus.plexus</groupId>
<artifactId>plexus-java</artifactId>
<version>1.3.0</version>
</dependency>
</dependencies>
</plugin>
<plugin>
<artifactId>maven-dependency-plugin</artifactId>
<version>3.8.1</version>
</plugin>
<plugin>
<artifactId>maven-deploy-plugin</artifactId>
<version>3.1.3</version>
<version>3.1.4</version>
</plugin>
<plugin>
<artifactId>maven-enforcer-plugin</artifactId>
Expand All @@ -399,7 +380,7 @@
</plugin>
<plugin>
<artifactId>maven-install-plugin</artifactId>
<version>3.1.3</version>
<version>3.1.4</version>
</plugin>
<plugin>
<artifactId>maven-jar-plugin</artifactId>
Expand Down Expand Up @@ -435,7 +416,7 @@
</plugin>
<plugin>
<artifactId>maven-project-info-reports-plugin</artifactId>
<version>3.8.0</version>
<version>3.9.0</version>
</plugin>
<plugin>
<artifactId>maven-release-plugin</artifactId>
Expand Down Expand Up @@ -488,7 +469,7 @@
<plugin>
<groupId>com.github.spotbugs</groupId>
<artifactId>spotbugs-maven-plugin</artifactId>
<version>4.8.6.6</version>
<version>4.9.2.0</version>
</plugin>
<plugin>
<groupId>org.codehaus.mojo</groupId>
Expand All @@ -498,7 +479,7 @@
<plugin>
<groupId>io.smallrye</groupId>
<artifactId>jandex-maven-plugin</artifactId>
<version>3.2.3</version>
<version>3.2.7</version>
</plugin>
<plugin>
<groupId>org.sonatype.plugins</groupId>
Expand Down
4 changes: 2 additions & 2 deletions src/main/java/module-info.java
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,10 @@
exports org.microbean.scopelet;

requires transitive org.microbean.assign;
requires org.microbean.attributes;
requires transitive org.microbean.bean;
requires org.microbean.constant;
requires org.microbean.construct;
requires transitive org.microbean.qualifier;
requires transitive org.microbean.scope;
requires transitive org.microbean.reference;

}
8 changes: 4 additions & 4 deletions src/main/java/org/microbean/scopelet/MapBackedScopelet.java
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
import org.microbean.bean.Factory;
import org.microbean.bean.Request;

import org.microbean.qualifier.NamedAttributeMap;
import org.microbean.attributes.Attributes;

/**
* A thread-safe, partial {@link Scopelet} implementation backed by {@link ConcurrentMap} machinery.
Expand All @@ -45,14 +45,14 @@ public abstract class MapBackedScopelet<M extends MapBackedScopelet<M>> extends
/**
* Creates a new {@link MapBackedScopelet}.
*
* @param scopeId a {@link NamedAttributeMap} identifying the scope this {@link MapBackedScopelet} serves; must not be
* @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(NamedAttributeMap)
* @see Scopelet#Scopelet(Attributes)
*/
protected MapBackedScopelet(final NamedAttributeMap<?> scopeId) {
protected MapBackedScopelet(final Attributes scopeId) {
super(scopeId);
this.creationLocks = new ConcurrentHashMap<>();
this.instances = new ConcurrentHashMap<>();
Expand Down
18 changes: 7 additions & 11 deletions src/main/java/org/microbean/scopelet/NoneScopelet.java
Original file line number Diff line number Diff line change
Expand Up @@ -24,22 +24,18 @@
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.constant.Constables;

import org.microbean.construct.Domain;

import static java.lang.constant.ConstantDescs.BSM_INVOKE;

import static org.microbean.assign.Qualifiers.anyQualifier;

import static org.microbean.scope.Scope.NONE_ID;
import static org.microbean.scope.Scope.SINGLETON_ID;

/**
* A {@link Scopelet} implementation that does not cache objects at all.
*
Expand Down Expand Up @@ -67,12 +63,12 @@ public NoneScopelet(final Domain domain) {
@Override // Scopelet<NoneScopelet>
public Id id() {
return
new Id(List.of(this.domain.declaredType(NoneScopelet.class.getName()),
this.domain.declaredType(null,
this.domain.typeElement(Scopelet.class.getName()),
this.domain.declaredType(NoneScopelet.class.getName()))),
List.of(NONE_ID, anyQualifier()), // qualifiers
SINGLETON_ID); // the scope we belong to
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.
Expand Down
Loading
Loading