Add FunctionInspector back to SimpleFunctionRegistry
Even though it is deprecated and SimpleFunctionRegistry will throw UnsupportedOperationException in case getRegistration() methid is called we need to re-enable it temporarily to mitigate breaking API changes
This commit is contained in:
@@ -77,7 +77,7 @@ import org.springframework.util.StringUtils;
|
||||
* @author Oleg Zhurakousky
|
||||
*
|
||||
*/
|
||||
public class SimpleFunctionRegistry implements FunctionRegistry {
|
||||
public class SimpleFunctionRegistry implements FunctionRegistry, FunctionInspector {
|
||||
protected Log logger = LogFactory.getLog(this.getClass());
|
||||
/*
|
||||
* - do we care about FunctionRegistration after it's been registered? What additional value does it bring?
|
||||
@@ -106,6 +106,13 @@ public class SimpleFunctionRegistry implements FunctionRegistry {
|
||||
this.headersField.setAccessible(true);
|
||||
}
|
||||
|
||||
@Override
|
||||
public FunctionRegistration<?> getRegistration(Object function) {
|
||||
throw new UnsupportedOperationException("FunctionInspector is deprecated. There is no need "
|
||||
+ "to access FunctionRegistration directly since you can interogate the actual "
|
||||
+ "looked-up function (see FunctionInvocationWrapper.");
|
||||
}
|
||||
|
||||
@SuppressWarnings("unchecked")
|
||||
@Override
|
||||
public <T> T lookup(Class<?> type, String functionDefinition, String... expectedOutputMimeTypes) {
|
||||
|
||||
Reference in New Issue
Block a user