Skip to content

Commit 4caec0e

Browse files
committed
Add return-only constructor for SmartBinder
1 parent 3f52eaf commit 4caec0e

1 file changed

Lines changed: 10 additions & 0 deletions

File tree

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

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -101,6 +101,16 @@ public static SmartBinder from(Class<?> retType, String[] names, Class<?>... typ
101101
return from(Signature.returning(retType).appendArgs(names, types));
102102
}
103103

104+
/**
105+
* Create a new SmartBinder with from the given return type.
106+
*
107+
* @param retType the type of the return value to start with
108+
* @return a new SmartBinder
109+
*/
110+
public static SmartBinder from(Class<?> retType) {
111+
return from(Signature.returning(retType));
112+
}
113+
104114
/**
105115
* Create a new SmartBinder with from the given types and argument name.
106116
*

0 commit comments

Comments
 (0)