-
Notifications
You must be signed in to change notification settings - Fork 33
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(AssembleMethod): support for creating target instance through sp…
…ring's BeanFactory
- Loading branch information
1 parent
1f035ac
commit 54c0c68
Showing
4 changed files
with
147 additions
and
54 deletions.
There are no files selected for viewing
22 changes: 22 additions & 0 deletions
22
crane4j-core/src/main/java/cn/crane4j/core/util/CheckedFunction.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
package cn.crane4j.core.util; | ||
|
||
/** | ||
* A functional interface that can be used to perform a computation that may throw an exception. | ||
* | ||
* @author huangchengxing | ||
* @param <T> the type of the argument | ||
* @param <R> the type of the result | ||
*/ | ||
@FunctionalInterface | ||
public interface CheckedFunction<T, R> { | ||
|
||
/** | ||
* Apply this function to the given argument. | ||
* | ||
* @param t the function argument | ||
* @return the function result | ||
* @throws Throwable the exception that may be thrown when applying the function | ||
*/ | ||
@SuppressWarnings("java:S112") | ||
R apply(T t) throws Throwable; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters