Skip to content

Commit 06306ec

Browse files
committed
Add Signature.from that takes MethodType
1 parent 9473e40 commit 06306ec

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

src/main/java/com/headius/invokebinder/Signature.java

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -157,6 +157,17 @@ public static Signature from(Class<?> retval, Class<?>[] argTypes, String... arg
157157
return new Signature(retval, argTypes, argNames);
158158
}
159159

160+
/**
161+
* Create a new signature based on the given MethodType and argument names.
162+
*
163+
* @param methodType the method type for the new signature
164+
* @param argNames the names of the arguments
165+
* @return a new Signature
166+
*/
167+
public static Signature from(MethodType methodType, String... argNames) {
168+
return new Signature(methodType, argNames);
169+
}
170+
160171
/**
161172
* Create a new signature based on this one with a different return type.
162173
*

0 commit comments

Comments
 (0)