- synchronized(mapFunctionDefinitions) {
- if (needMapInit) {
- needMapInit = false;
- Field[] declaredFields = StdFunctions.class.getDeclaredFields();
- for (Field field : declaredFields) {
- if (Modifier.isStatic(field.getModifiers()) &&
- field.getName().startsWith(StdFunctions.FD_PREFIX) &&
- FunctionDefinition.class.isAssignableFrom(field.getType()) &&
- Modifier.isPublic(field.getModifiers())
- ) {
- try {
- register((FunctionDefinition)(field.get(null)));
- } catch (IllegalAccessException ex) {
- logger.error(ex.getMessage() +ex);
- }
- }
- }
- //
- // Our custom function
- //
- //register(FunctionDefinitionCustomRegexpMatch);
- register(FD_CUSTOM_REGEXP_MATCH);
- }
- }
- }
-
- public OnapFunctionDefinitionFactory() {
- initMap();
- }