Add "wrapper" type methods to FunctionInspector

These can be used to more reliably discover whether the user
has declared a function with flux types or "bare" POJOs. They
then pave the way to supporting single valued types in a special
way.

Also consolidate and simplify the logic in FunctionInspector
This commit is contained in:
Dave Syer
2017-05-24 09:08:30 +01:00
parent 719237e9c7
commit 0d2418a47b
11 changed files with 283 additions and 84 deletions

View File

@@ -75,6 +75,16 @@ public class FunctionExtractingFunctionCatalog implements FunctionCatalog, Funct
return (Class<?>) inspect(name, "getOutputType");
}
@Override
public Class<?> getInputWrapper(String name) {
return (Class<?>) inspect(name, "getInputWrapper");
}
@Override
public Class<?> getOutputWrapper(String name) {
return (Class<?>) inspect(name, "getOutputWrapper");
}
@Override
public Object convert(String name, String value) {
return inspect(name, "convert");