public final class FunctionRegistry extends Object
| Constructor and Description |
|---|
FunctionRegistry()
this is a singleton so private constructor
|
| Modifier and Type | Method and Description |
|---|---|
String |
executeFunction(String functionName,
String... arguments)
execution a function based on the name of that function and it's argumetns
|
Map<String,String> |
getGetAndPutCache()
|
Method |
getMethod(String functionName,
String... arguments)
find a method based on name and it's arguments
|
Map<String,IndexHolder> |
getStringIndexHolderMap()
get the map that is responsible for keeping track of indices via the
IndexHolder |
void |
registerClass(Class<?> clazz)
register a class that has functions
|
public FunctionRegistry()
public Map<String,IndexHolder> getStringIndexHolderMap()
IndexHolderpublic void registerClass(Class<?> clazz)
clazz - the class that has the Function and FunctionInvocationpublic String executeFunction(String functionName, String... arguments) throws InvocationTargetException, IllegalAccessException
functionName - the function namearguments - the argumentsInvocationTargetException - if there is an issue running the functionIllegalAccessException - if there is a issue getting a hold of the method responsible for
serving the functionpublic Method getMethod(String functionName, String... arguments) throws IllegalArgumentException
functionName - name of functionsarguments - arguments to call on functionIllegalArgumentException - if there is an issue grabbing the methodCopyright © 2022. All rights reserved.