GH-199 Added support for typeless lookup in FunctionCatalog

Updated both the interface as well as InMemoryFunctionCatalog BeanFactoryFunctionCatalog and SingleEntryFunctionRegistry implementations
Added tests

Resolves #199
This commit is contained in:
Oleg Zhurakousky
2018-08-15 17:55:22 +02:00
parent fffe67cdcf
commit 30187b583b
9 changed files with 138 additions and 68 deletions

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2016-2017 the original author or authors.
* Copyright 2016-2018 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -37,7 +37,7 @@ public class SingleEntryFunctionRegistry implements FunctionRegistry {
}
@Override
public <T> T lookup(Class<?> type, String name) {
public <T> T lookup(Class<T> type, String name) {
return this.name.equals(name) ? this.delegate.lookup(type, name) : null;
}