Skip to content

Commit 3335187

Browse files
authored
Adds synthetic annotations and required changes. Refreshes dependencies. Removes spurious imports. (#33)
Signed-off-by: Laird Nelson <[email protected]>
1 parent a888124 commit 3335187

23 files changed

+1925
-355
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ as a Maven dependency:
3131
Always check https://search.maven.org/artifact/org.microbean/microbean-construct
3232
for up-to-date available versions.
3333
-->
34-
<version>0.0.17</version>
34+
<version>0.0.18</version>
3535
</dependency>
3636
```
3737

pom.xml

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -143,7 +143,7 @@
143143
</plugin>
144144
<plugin>
145145
<artifactId>maven-assembly-plugin</artifactId>
146-
<version>3.7.1</version>
146+
<version>3.8.0</version>
147147
</plugin>
148148
<plugin>
149149
<artifactId>maven-checkstyle-plugin</artifactId>
@@ -215,11 +215,11 @@
215215
</plugin>
216216
<plugin>
217217
<artifactId>maven-release-plugin</artifactId>
218-
<version>3.2.0</version>
218+
<version>3.3.1</version>
219219
</plugin>
220220
<plugin>
221221
<artifactId>maven-resources-plugin</artifactId>
222-
<version>3.3.1</version>
222+
<version>3.4.0</version>
223223
</plugin>
224224
<plugin>
225225
<artifactId>maven-scm-plugin</artifactId>
@@ -235,7 +235,7 @@
235235
</plugin>
236236
<plugin>
237237
<artifactId>maven-source-plugin</artifactId>
238-
<version>3.3.1</version>
238+
<version>3.4.0</version>
239239
<executions>
240240
<execution>
241241
<id>attach-sources</id>
@@ -256,17 +256,17 @@
256256
<plugin>
257257
<groupId>com.github.spotbugs</groupId>
258258
<artifactId>spotbugs-maven-plugin</artifactId>
259-
<version>4.9.8.1</version>
259+
<version>4.9.8.2</version>
260260
</plugin>
261261
<plugin>
262262
<groupId>org.codehaus.mojo</groupId>
263263
<artifactId>versions-maven-plugin</artifactId>
264-
<version>2.19.1</version>
264+
<version>2.20.1</version>
265265
</plugin>
266266
<plugin>
267267
<groupId>io.smallrye</groupId>
268268
<artifactId>jandex-maven-plugin</artifactId>
269-
<version>3.5.2</version>
269+
<version>3.5.3</version>
270270
</plugin>
271271
<plugin>
272272
<groupId>org.sonatype.central</groupId>

src/main/java/org/microbean/construct/BlockingCompilationTask.java

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,6 @@
2525
import java.util.Collections;
2626
import java.util.List;
2727
import java.util.Locale;
28-
import java.util.Objects;
2928
import java.util.Set;
3029

3130
import java.util.concurrent.CompletableFuture;

src/main/java/org/microbean/construct/DefaultDomain.java

Lines changed: 16 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -35,8 +35,6 @@
3535
import javax.lang.model.element.ModuleElement;
3636
import javax.lang.model.element.Name;
3737
import javax.lang.model.element.Parameterizable;
38-
import javax.lang.model.element.QualifiedNameable;
39-
import javax.lang.model.element.RecordComponentElement;
4038
import javax.lang.model.element.TypeElement;
4139

4240
import javax.lang.model.util.Elements;
@@ -82,7 +80,8 @@ public DefaultDomain() {
8280
}
8381

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

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

288-
private final Elements elements() {
288+
// Non-private for testing only.
289+
final Elements elements() {
289290
return this.pe().getElementUtils();
290291
}
291292

@@ -331,6 +332,12 @@ public UniversalElement javaLangObject() {
331332
return UniversalElement.of(Domain.super.javaLangObject(), this);
332333
}
333334

335+
// (Convenience.)
336+
@Override // Domain
337+
public UniversalType javaLangObjectType() {
338+
return UniversalType.of(Domain.super.javaLangObjectType(), this);
339+
}
340+
334341
/**
335342
* Returns a non-{@code null} {@link Unlockable} that should be used in a {@code try}-with-resources block guarding
336343
* operations that might cause symbol completion.
@@ -559,7 +566,8 @@ public UniversalElement typeParameterElement(final Parameterizable p, final Char
559566
return UniversalElement.of(Domain.super.typeParameterElement(p, name), this);
560567
}
561568

562-
private final Types types() {
569+
// Non-private for testing only.
570+
final Types types() {
563571
return this.pe().getTypeUtils();
564572
}
565573

0 commit comments

Comments
 (0)