Disconnect FunctionInspector from AbstractComposableFunctionRegistry and SimpleFunctionRegistry

This commit is contained in:
Mingyuan Wu
2020-12-06 16:41:31 +08:00
committed by Oleg Zhurakousky
parent 555526192f
commit 271bc22969
2 changed files with 3 additions and 10 deletions

View File

@@ -63,7 +63,7 @@ import org.springframework.util.StringUtils;
*
*/
public abstract class AbstractComposableFunctionRegistry implements FunctionRegistry,
FunctionInspector, ApplicationEventPublisherAware, EnvironmentAware {
ApplicationEventPublisherAware, EnvironmentAware {
private final Map<String, Object> functions = new ConcurrentHashMap<>();
@@ -170,7 +170,7 @@ public abstract class AbstractComposableFunctionRegistry implements FunctionRegi
this.environment = environment;
}
@Override
public FunctionRegistration<?> getRegistration(Object function) {
String functionName = function == null ? null
: this.lookupFunctionName(function);

View File

@@ -77,7 +77,7 @@ import org.springframework.util.StringUtils;
* @author Oleg Zhurakousky
*
*/
public class SimpleFunctionRegistry implements FunctionRegistry, FunctionInspector {
public class SimpleFunctionRegistry implements FunctionRegistry {
protected Log logger = LogFactory.getLog(this.getClass());
/*
* - do we care about FunctionRegistration after it's been registered? What additional value does it bring?
@@ -133,13 +133,6 @@ public class SimpleFunctionRegistry implements FunctionRegistry, FunctionInspect
return (T) function;
}
@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.");
}
@Override
public <T> void register(FunctionRegistration<T> registration) {
Assert.notNull(registration, "'registration' must not be null");