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 @@ -31,7 +31,7 @@ as a Maven dependency:
Always check https://search.maven.org/artifact/org.microbean/microbean-construct
for up-to-date available versions.
-->
<version>0.0.17</version>
<version>0.0.18</version>
</dependency>
```

Expand Down
14 changes: 7 additions & 7 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,7 @@
</plugin>
<plugin>
<artifactId>maven-assembly-plugin</artifactId>
<version>3.7.1</version>
<version>3.8.0</version>
</plugin>
<plugin>
<artifactId>maven-checkstyle-plugin</artifactId>
Expand Down Expand Up @@ -215,11 +215,11 @@
</plugin>
<plugin>
<artifactId>maven-release-plugin</artifactId>
<version>3.2.0</version>
<version>3.3.1</version>
</plugin>
<plugin>
<artifactId>maven-resources-plugin</artifactId>
<version>3.3.1</version>
<version>3.4.0</version>
</plugin>
<plugin>
<artifactId>maven-scm-plugin</artifactId>
Expand All @@ -235,7 +235,7 @@
</plugin>
<plugin>
<artifactId>maven-source-plugin</artifactId>
<version>3.3.1</version>
<version>3.4.0</version>
<executions>
<execution>
<id>attach-sources</id>
Expand All @@ -256,17 +256,17 @@
<plugin>
<groupId>com.github.spotbugs</groupId>
<artifactId>spotbugs-maven-plugin</artifactId>
<version>4.9.8.1</version>
<version>4.9.8.2</version>
</plugin>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>versions-maven-plugin</artifactId>
<version>2.19.1</version>
<version>2.20.1</version>
</plugin>
<plugin>
<groupId>io.smallrye</groupId>
<artifactId>jandex-maven-plugin</artifactId>
<version>3.5.2</version>
<version>3.5.3</version>
</plugin>
<plugin>
<groupId>org.sonatype.central</groupId>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@
import java.util.Collections;
import java.util.List;
import java.util.Locale;
import java.util.Objects;
import java.util.Set;

import java.util.concurrent.CompletableFuture;
Expand Down
24 changes: 16 additions & 8 deletions src/main/java/org/microbean/construct/DefaultDomain.java
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,6 @@
import javax.lang.model.element.ModuleElement;
import javax.lang.model.element.Name;
import javax.lang.model.element.Parameterizable;
import javax.lang.model.element.QualifiedNameable;
import javax.lang.model.element.RecordComponentElement;
import javax.lang.model.element.TypeElement;

import javax.lang.model.util.Elements;
Expand Down Expand Up @@ -82,7 +80,8 @@ public DefaultDomain() {
}

/**
* Creates a new {@link DefaultDomain} whose usage type is determined by the argument supplied to this constructor.
* Creates a new {@link DefaultDomain} <strong>normally for use at annotation processing time</strong>, whose usage
* type is actually determined by the argument supplied to this constructor.
*
* @param pe a {@link ProcessingEnvironment}; may be {@code null} in which case the return value of an invocation of
* {@link Supplier#get()} on the return value of an invocation of {@link RuntimeProcessingEnvironmentSupplier#of()}
Expand Down Expand Up @@ -113,16 +112,17 @@ public DefaultDomain(final Lock lock) {
}

/**
* Creates a new {@link DefaultDomain} whose usage type is determined by the arguments supplied to this constructor.
* Creates a new {@link DefaultDomain} <strong>normally for use at annotation processing time</strong>, whose usage
* type is actually determined by the arguments supplied to this constructor.
*
* @param pe a {@link ProcessingEnvironment}; may be {@code null} in which case the return value of an invocation of
* {@link Supplier#get()} on the return value of an invocation of {@link RuntimeProcessingEnvironmentSupplier#of()}
* will be used instead
*
* @param lock a {@link Lock} to use to serialize symbol completion; if {@code null} and {@code pe} is {@code null},
* then a global {@link ReentrantLock} will be used instead; if {@code null} and {@code pe} is non-{@code null}, then
* no serialization of symbol completion will occur and this {@link DefaultDomain} will not be safe for concurrent use
* by multiple threads
* no serialization of symbol completion will occur <strong>and this {@link DefaultDomain} therefore will not be safe
* for concurrent use by multiple threads</strong>
*
* @see RuntimeProcessingEnvironmentSupplier
*
Expand Down Expand Up @@ -285,7 +285,8 @@ public UniversalType elementType(final TypeMirror t) {
return UniversalType.of(Domain.super.elementType(t), this);
}

private final Elements elements() {
// Non-private for testing only.
final Elements elements() {
return this.pe().getElementUtils();
}

Expand Down Expand Up @@ -331,6 +332,12 @@ public UniversalElement javaLangObject() {
return UniversalElement.of(Domain.super.javaLangObject(), this);
}

// (Convenience.)
@Override // Domain
public UniversalType javaLangObjectType() {
return UniversalType.of(Domain.super.javaLangObjectType(), this);
}

/**
* Returns a non-{@code null} {@link Unlockable} that should be used in a {@code try}-with-resources block guarding
* operations that might cause symbol completion.
Expand Down Expand Up @@ -559,7 +566,8 @@ public UniversalElement typeParameterElement(final Parameterizable p, final Char
return UniversalElement.of(Domain.super.typeParameterElement(p, name), this);
}

private final Types types() {
// Non-private for testing only.
final Types types() {
return this.pe().getTypeUtils();
}

Expand Down
Loading