diff --git a/README.md b/README.md index ed5c0a0..a7d2262 100644 --- a/README.md +++ b/README.md @@ -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. --> - 0.0.15 + 0.0.16 ``` diff --git a/pom.xml b/pom.xml index af432c9..cf893bf 100644 --- a/pom.xml +++ b/pom.xml @@ -57,13 +57,6 @@ microBean™ Construct Site https://microbean.github.io/microbean-construct/ - - @@ -86,7 +79,6 @@ deployment [maven-release-plugin] [skip ci] v@{project.version} - false @@ -192,11 +184,11 @@ maven-enforcer-plugin - 3.5.0 + 3.6.1 maven-gpg-plugin - 3.2.7 + 3.2.8 maven-install-plugin @@ -208,7 +200,7 @@ maven-javadoc-plugin - 3.11.2 + 3.11.3 true @@ -264,7 +256,7 @@ com.github.spotbugs spotbugs-maven-plugin - 4.9.3.1 + 4.9.4.0 org.codehaus.mojo @@ -274,7 +266,7 @@ io.smallrye jandex-maven-plugin - 3.3.1 + 3.4.0 org.sonatype.central @@ -411,5 +403,4 @@ - diff --git a/src/main/java/org/microbean/construct/constant/Constables.java b/src/main/java/org/microbean/construct/constant/Constables.java index ba843e3..205b7b6 100644 --- a/src/main/java/org/microbean/construct/constant/Constables.java +++ b/src/main/java/org/microbean/construct/constant/Constables.java @@ -108,7 +108,7 @@ public static final Optional describe(final Name n, fina default -> (d instanceof Constable c ? c.describeConstable() : Optional.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)), @@ -207,7 +207,7 @@ public static final Optional 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, @@ -260,7 +260,7 @@ public static final Optional 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)), @@ -289,7 +289,7 @@ public static final Optional 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)), @@ -318,7 +318,7 @@ public static final Optional 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)), @@ -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, @@ -385,7 +385,7 @@ public static final Optional 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)), @@ -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)), @@ -487,7 +487,7 @@ public static final Optional 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)), @@ -525,10 +525,11 @@ yield switch (t.getKind()) { case DECLARED -> { final List 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, @@ -585,7 +586,7 @@ public static final Optional 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)), @@ -616,7 +617,7 @@ public static final Optional describe(final NullType t, default -> (d instanceof Constable c ? c.describeConstable() : Optional.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)); @@ -649,7 +650,7 @@ public static final Optional 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)), @@ -691,7 +692,7 @@ public static final Optional 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, @@ -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,