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.15</version>
<version>0.0.16</version>
</dependency>
```

Expand Down
19 changes: 5 additions & 14 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -57,13 +57,6 @@
<name>microBean™ Construct Site</name>
<url>https://microbean.github.io/microbean-construct/</url>
</site>
<!-- Ostensibly no longer needed with central-publishing-maven-plugin (see https://central.sonatype.org/publish/publish-portal-snapshots/#publishing-with-the-central-publishing-maven-plugin) -->
<!--
<snapshotRepository>
<id>central.sonatype.com</id>
<url>https://central.sonatype.com/repository/maven-snapshots/</url>
</snapshotRepository>
-->
</distributionManagement>

<properties>
Expand All @@ -86,7 +79,6 @@
<releaseProfiles>deployment</releaseProfiles>
<scmCommentPrefix>[maven-release-plugin] [skip ci]</scmCommentPrefix>
<tagNameFormat>v@{project.version}</tagNameFormat>
<useReleaseProfile>false</useReleaseProfile>

<!-- maven-scm-publish-plugin properties;
see https://maven.apache.org/plugins/maven-scm-publish-plugin/publish-scm-mojo.html -->
Expand Down Expand Up @@ -192,11 +184,11 @@
</plugin>
<plugin>
<artifactId>maven-enforcer-plugin</artifactId>
<version>3.5.0</version>
<version>3.6.1</version>
</plugin>
<plugin>
<artifactId>maven-gpg-plugin</artifactId>
<version>3.2.7</version>
<version>3.2.8</version>
</plugin>
<plugin>
<artifactId>maven-install-plugin</artifactId>
Expand All @@ -208,7 +200,7 @@
</plugin>
<plugin>
<artifactId>maven-javadoc-plugin</artifactId>
<version>3.11.2</version>
<version>3.11.3</version>
<configuration>
<docfilessubdirs>true</docfilessubdirs>
</configuration>
Expand Down Expand Up @@ -264,7 +256,7 @@
<plugin>
<groupId>com.github.spotbugs</groupId>
<artifactId>spotbugs-maven-plugin</artifactId>
<version>4.9.3.1</version>
<version>4.9.4.0</version>
</plugin>
<plugin>
<groupId>org.codehaus.mojo</groupId>
Expand All @@ -274,7 +266,7 @@
<plugin>
<groupId>io.smallrye</groupId>
<artifactId>jandex-maven-plugin</artifactId>
<version>3.3.1</version>
<version>3.4.0</version>
</plugin>
<plugin>
<groupId>org.sonatype.central</groupId>
Expand Down Expand Up @@ -411,5 +403,4 @@
</profile>
</profiles>


</project>
33 changes: 17 additions & 16 deletions src/main/java/org/microbean/construct/constant/Constables.java
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ public static final Optional<? extends ConstantDesc> describe(final Name n, fina
default -> (d instanceof Constable c ? c.describeConstable() : Optional.<ConstantDesc>empty())
.map(domainDesc -> DynamicConstantDesc.of(BSM_INVOKE,
MethodHandleDesc.ofMethod(VIRTUAL,
ClassDesc.of(d.getClass().getName()),
ClassDesc.of(Domain.class.getName()),
"name",
MethodTypeDesc.of(CD_Name,
CD_CharSequence)),
Expand Down Expand Up @@ -207,7 +207,7 @@ public static final Optional<? extends ConstantDesc> describe(final ExecutableEl
final ConstantDesc[] args = new ConstantDesc[5 + parameterCount];
args[0] =
MethodHandleDesc.ofMethod(VIRTUAL,
ClassDesc.of(d.getClass().getName()),
ClassDesc.of(Domain.class.getName()),
"executableElement",
MethodTypeDesc.of(CD_ExecutableElement,
CD_TypeElement,
Expand Down Expand Up @@ -260,7 +260,7 @@ public static final Optional<? extends ConstantDesc> describe(final ModuleElemen
default -> describe(e.getQualifiedName(), d) // getQualifiedName() does not cause symbol completion
.map(nameDesc -> DynamicConstantDesc.of(BSM_INVOKE,
MethodHandleDesc.ofMethod(VIRTUAL,
ClassDesc.of(d.getClass().getName()),
ClassDesc.of(Domain.class.getName()),
"moduleElement",
MethodTypeDesc.of(CD_ModuleElement,
CD_CharSequence)),
Expand Down Expand Up @@ -289,7 +289,7 @@ public static final Optional<? extends ConstantDesc> describe(final PackageEleme
default -> describe(e.getQualifiedName(), d) // getQualifiedName() does not cause symbol completion
.map(nameDesc -> DynamicConstantDesc.of(BSM_INVOKE,
MethodHandleDesc.ofMethod(VIRTUAL,
ClassDesc.of(d.getClass().getName()),
ClassDesc.of(Domain.class.getName()),
"packageElement",
MethodTypeDesc.of(CD_PackageElement,
CD_CharSequence)),
Expand Down Expand Up @@ -318,7 +318,7 @@ public static final Optional<? extends ConstantDesc> describe(final TypeElement
default -> describe(e.getQualifiedName(), d) // getQualifiedName() does not cause symbol completion
.map(nameDesc -> DynamicConstantDesc.of(BSM_INVOKE,
MethodHandleDesc.ofMethod(VIRTUAL,
ClassDesc.of(d.getClass().getName()),
ClassDesc.of(Domain.class.getName()),
"typeElement",
MethodTypeDesc.of(CD_TypeElement,
CD_CharSequence)),
Expand Down Expand Up @@ -350,7 +350,7 @@ yield describe(e.getEnclosingElement(), d)
.flatMap(parameterizableDesc -> describe(e.getSimpleName(), d)
.map(nameDesc -> DynamicConstantDesc.of(BSM_INVOKE,
MethodHandleDesc.ofMethod(VIRTUAL,
ClassDesc.of(d.getClass().getName()),
ClassDesc.of(Domain.class.getName()),
"typeParameterElement",
MethodTypeDesc.of(CD_TypeParameterElement,
CD_Parameterizable,
Expand Down Expand Up @@ -385,7 +385,7 @@ public static final Optional<? extends ConstantDesc> describe(final RecordCompon
yield describe((TypeElement)e.getEnclosingElement(), d)
.map(executableDesc -> DynamicConstantDesc.of(BSM_INVOKE,
MethodHandleDesc.ofMethod(VIRTUAL,
ClassDesc.of(d.getClass().getName()),
ClassDesc.of(Domain.class.getName()),
"recordComponentElement",
MethodTypeDesc.of(CD_RecordComponentElement,
CD_ExecutableElement)),
Expand Down Expand Up @@ -419,7 +419,7 @@ yield describe(e.getSimpleName(), d)
.flatMap(nameDesc -> describe(e.getEnclosingElement(), d)
.map(enclosingElementDesc -> DynamicConstantDesc.of(BSM_INVOKE,
MethodHandleDesc.ofMethod(VIRTUAL,
ClassDesc.of(d.getClass().getName()),
ClassDesc.of(Domain.class.getName()),
"variableElement",
MethodTypeDesc.of(CD_Element,
CD_CharSequence)),
Expand Down Expand Up @@ -487,7 +487,7 @@ public static final Optional<? extends ConstantDesc> describe(final ArrayType t,
yield describe(t.getComponentType(), d)
.map(componentTypeDesc -> DynamicConstantDesc.of(BSM_INVOKE,
MethodHandleDesc.ofMethod(VIRTUAL,
ClassDesc.of(d.getClass().getName()),
ClassDesc.of(Domain.class.getName()),
"arrayTypeOf",
MethodTypeDesc.of(CD_ArrayType,
CD_TypeMirror)),
Expand Down Expand Up @@ -525,10 +525,11 @@ yield switch (t.getKind()) {
case DECLARED -> {
final List<? extends TypeMirror> typeArguments = t.getTypeArguments();
final int typeArgumentCount = typeArguments.size();
final ConstantDesc[] args = new ConstantDesc[3 + typeArgumentCount];
final ConstantDesc[] args = new ConstantDesc[4 + typeArgumentCount];
final TypeMirror enclosingType = t.getEnclosingType();
// Call
args[0] = MethodHandleDesc.ofMethod(VIRTUAL,
ClassDesc.of(d.getClass().getName()),
ClassDesc.of(Domain.class.getName()),
"declaredType",
MethodTypeDesc.of(CD_DeclaredType,
CD_DeclaredType,
Expand Down Expand Up @@ -585,7 +586,7 @@ public static final Optional<? extends ConstantDesc> describe(final NoType t, fi
yield t.getKind().describeConstable()
.map(typeKindDesc -> DynamicConstantDesc.of(BSM_INVOKE,
MethodHandleDesc.ofMethod(VIRTUAL,
ClassDesc.of(d.getClass().getName()),
ClassDesc.of(Domain.class.getName()),
"noType",
MethodTypeDesc.of(CD_NoType,
CD_TypeKind)),
Expand Down Expand Up @@ -616,7 +617,7 @@ public static final Optional<? extends ConstantDesc> describe(final NullType t,
default -> (d instanceof Constable c ? c.describeConstable() : Optional.<ConstantDesc>empty())
.map(domainDesc -> DynamicConstantDesc.of(BSM_INVOKE,
MethodHandleDesc.ofMethod(VIRTUAL,
ClassDesc.of(d.getClass().getName()),
ClassDesc.of(Domain.class.getName()),
"nullType",
MethodTypeDesc.of(CD_NullType)),
domainDesc));
Expand Down Expand Up @@ -649,7 +650,7 @@ public static final Optional<? extends ConstantDesc> describe(final PrimitiveTyp
yield t.getKind().describeConstable()
.map(typeKindDesc -> DynamicConstantDesc.of(BSM_INVOKE,
MethodHandleDesc.ofMethod(VIRTUAL,
ClassDesc.of(d.getClass().getName()),
ClassDesc.of(Domain.class.getName()),
"primitiveType",
MethodTypeDesc.of(CD_PrimitiveType,
CD_TypeKind)),
Expand Down Expand Up @@ -691,7 +692,7 @@ public static final Optional<? extends ConstantDesc> describe(final TypeVariable
final String name = d.toString(e.getSimpleName());
yield Optional.of(DynamicConstantDesc.of(BSM_INVOKE,
MethodHandleDesc.ofMethod(VIRTUAL,
ClassDesc.of(d.getClass().getName()),
ClassDesc.of(Domain.class.getName()),
"typeVariable",
MethodTypeDesc.of(CD_TypeVariable,
CD_Parameterizable,
Expand Down Expand Up @@ -728,7 +729,7 @@ yield describe(t.getExtendsBound(), d)
.flatMap(extendsBoundDesc -> describe(t.getSuperBound(), d)
.map(superBoundDesc -> DynamicConstantDesc.of(BSM_INVOKE,
MethodHandleDesc.ofMethod(VIRTUAL,
ClassDesc.of(d.getClass().getName()),
ClassDesc.of(Domain.class.getName()),
"wildcardType",
MethodTypeDesc.of(CD_WildcardType,
CD_TypeMirror,
Expand Down