[Git][java-team/invokebinder][upstream] New upstream version 1.16
Jérôme Charaoui (@lavamind)
gitlab at salsa.debian.org
Wed Aug 26 04:38:30 BST 2026
Jérôme Charaoui pushed to branch upstream at Debian Java Maintainers / invokebinder
Commits:
b7195d66 by Jérôme Charaoui at 2026-08-25T20:27:59-04:00
New upstream version 1.16
- - - - -
5 changed files:
- README.markdown
- pom.xml
- src/main/java/com/headius/invokebinder/Signature.java
- src/main/java/com/headius/invokebinder/SmartBinder.java
- src/main/java/com/headius/invokebinder/transform/Collect.java
Changes:
=====================================
README.markdown
=====================================
@@ -26,4 +26,10 @@ Status
This is currently under development. Not all transformations from the MethodHandle
API are yet supported.
-Contributors are welcome :)
\ No newline at end of file
+Contributors are welcome :)
+
+Releasing
+=========
+
+Use a Java 9+ JVM and run `mvn deploy -Prelease` to build and upload all necessary artifacts.
+
=====================================
pom.xml
=====================================
@@ -3,20 +3,15 @@
<groupId>com.headius</groupId>
<artifactId>invokebinder</artifactId>
<packaging>bundle</packaging>
- <version>1.14</version>
+ <version>1.16</version>
<name>invokebinder</name>
+ <description>The missing MethodHandle builder API</description>
<url>http://maven.apache.org</url>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
</properties>
- <parent>
- <groupId>org.sonatype.oss</groupId>
- <artifactId>oss-parent</artifactId>
- <version>7</version>
- </parent>
-
<licenses>
<license>
<name>The Apache Software License, Version 2.0</name>
@@ -29,7 +24,8 @@
<connection>scm:git:https://github.com/headius/invokebinder.git</connection>
<developerConnection>scm:git:git at github.com:headius/invokebinder.git</developerConnection>
<url>https://github.com/headius/invokebinder</url>
- </scm>
+ <tag>invokebinder-1.16</tag>
+ </scm>
<developers>
<developer>
@@ -39,6 +35,56 @@
</developer>
</developers>
+ <profiles>
+ <profile>
+ <id>release</id>
+ <build>
+ <plugins>
+ <plugin>
+ <artifactId>maven-javadoc-plugin</artifactId>
+ <version>3.2.0</version>
+ <configuration>
+ <source>8</source>
+ </configuration>
+ </plugin>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-source-plugin</artifactId>
+ <version>2.2.1</version>
+ <executions>
+ <execution>
+ <id>attach-sources</id>
+ <goals>
+ <goal>jar</goal>
+ </goals>
+ </execution>
+ </executions>
+ </plugin>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-gpg-plugin</artifactId>
+ <version>3.1.0</version>
+ <executions>
+ <execution>
+ <id>sign-artifacts</id>
+ <phase>verify</phase>
+ <goals>
+ <goal>sign</goal>
+ </goals>
+ </execution>
+ </executions>
+ <configuration>
+ <gpgArguments>
+ <gpgArgument>--pinentry-mode</gpgArgument>
+ <gpgArgument>loopback</gpgArgument>
+ </gpgArguments>
+ </configuration>
+ </plugin>
+ </plugins>
+ </build>
+ </profile>
+ </profiles>
+
<build>
<plugins>
<plugin>
@@ -104,10 +150,12 @@
</configuration>
</plugin>
<plugin>
- <artifactId>maven-javadoc-plugin</artifactId>
- <version>3.2.0</version>
+ <groupId>org.sonatype.central</groupId>
+ <artifactId>central-publishing-maven-plugin</artifactId>
+ <version>0.7.0</version>
+ <extensions>true</extensions>
<configuration>
- <source>8</source>
+ <publishingServerId>central</publishingServerId>
</configuration>
</plugin>
</plugins>
=====================================
src/main/java/com/headius/invokebinder/Signature.java
=====================================
@@ -143,6 +143,16 @@ public class Signature {
return sig;
}
+ /**
+ * Create a new signature based on the given return value
+ *
+ * @param retval the type of the return value
+ * @return a new Signature
+ */
+ public static Signature from(Class<?> retval) {
+ return new Signature(retval);
+ }
+
/**
* Create a new signature based on the given return value, argument types, and argument names
*
@@ -157,6 +167,17 @@ public class Signature {
return new Signature(retval, argTypes, argNames);
}
+ /**
+ * Create a new signature based on the given MethodType and argument names.
+ *
+ * @param methodType the method type for the new signature
+ * @param argNames the names of the arguments
+ * @return a new Signature
+ */
+ public static Signature from(MethodType methodType, String... argNames) {
+ return new Signature(methodType, argNames);
+ }
+
/**
* Create a new signature based on this one with a different return type.
*
=====================================
src/main/java/com/headius/invokebinder/SmartBinder.java
=====================================
@@ -101,6 +101,16 @@ public class SmartBinder {
return from(Signature.returning(retType).appendArgs(names, types));
}
+ /**
+ * Create a new SmartBinder with from the given return type.
+ *
+ * @param retType the type of the return value to start with
+ * @return a new SmartBinder
+ */
+ public static SmartBinder from(Class<?> retType) {
+ return from(Signature.returning(retType));
+ }
+
/**
* Create a new SmartBinder with from the given types and argument name.
*
@@ -853,6 +863,26 @@ public class SmartBinder {
return new SmartBinder(this, newSignature, binder.collect(index, signature().argCount() - (newSignature.argCount() - 1), Array.newInstance(signature().argType(index), 0).getClass()));
}
+ /**
+ * Collect arguments matching namePattern into an trailing array argument
+ * named outName.
+ *
+ * The namePattern is a standard regular expression.
+ *
+ * @param outName the name of the new array argument
+ * @param namePattern a pattern with which to match arguments for collecting
+ * @return a new SmartBinder with the collect applied
+ */
+ public SmartBinder collect(String outName, Class<?> outType, String namePattern) {
+ int index = signature().argOffsets(namePattern);
+
+ assert index >= 0 : "no arguments matching " + namePattern + " found in signature " + signature();
+
+ Signature newSignature = signature().collect(outName, namePattern);
+
+ return new SmartBinder(this, newSignature, binder.collect(index, signature().argCount() - (newSignature.argCount() - 1), Array.newInstance(signature().argType(index), 0).getClass()));
+ }
+
/**
* Collect arguments matching namePattern into an trailing array argument
* named outName, using collector to construct the array object.
=====================================
src/main/java/com/headius/invokebinder/transform/Collect.java
=====================================
@@ -112,14 +112,14 @@ public class Collect extends Transform {
Class<?> componentType = resultType.getComponentType();
for (int i = index; i < index + count; i++) {
Class<?> in = source.parameterType(i);
- assert in.isAssignableFrom(componentType)
+ assert componentType.isAssignableFrom(in)
: "incoming type " + in.getName() + " not compatible with " + componentType.getName() + "[]";
}
} else {
for (int i = 0; i < count; i++) {
Class<?> in = source.parameterType(index + i);
Class<?> out = collector.type().parameterType(i);
- assert in.isAssignableFrom(out) : "incoming type " + in.getName() + " not compatible with " + out;
+ assert out.isAssignableFrom(in) : "incoming type " + in.getName() + " not compatible with " + out;
}
assert collector.type().returnType().isAssignableFrom(resultType);
}
View it on GitLab: https://salsa.debian.org/java-team/invokebinder/-/commit/b7195d66f0427f2e5f633422b5d527695d8d7671
--
View it on GitLab: https://salsa.debian.org/java-team/invokebinder/-/commit/b7195d66f0427f2e5f633422b5d527695d8d7671
You're receiving this email because of your account on salsa.debian.org. Manage all notifications: https://salsa.debian.org/-/profile/notifications | Help: https://salsa.debian.org/help
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://alioth-lists.debian.net/pipermail/pkg-java-commits/attachments/20260826/b92952de/attachment.htm>
More information about the pkg-java-commits
mailing list