public String invokeStringMethod(String stringObj,String methodName,List<String> methodArgs){
  String value="";
  try {
    CustomConfigMethod configMethodDef=getCustomConfigMethod(methodName);
    if (configMethodDef == null) {
      logger.error("Couldn't find a string manipulation function with name {}",methodName);
      return null;
    }
    logger.debug("Invoking string method on string: {}",stringObj);
    logger.debug("Method: {} with method args: {}",configMethodDef.getName(),methodArgs);
    value=configMethodDef.invoke(stringObj,methodArgs);
  }
 catch (  Exception e) {
    logger.error("Exception while invoking string method-",e);
  }
  return value;
}

public String invokeStringMethod ( String stringObj , String methodName , List < String > methodArgs ) { String value = "" ; try { CustomConfigMethod configMethodDef = getCustomConfigMethod ( methodName ) ; if ( configMethodDef == null ) { logger . error ( "Couldn't find a string manipulation function with name {}" , methodName ) ; return null ; } logger . debug ( "Invoking string method on string: {}" , stringObj ) ; logger . debug ( "Method: {} with method args: {}" , configMethodDef . getName ( ) , methodArgs ) ; value = configMethodDef . invoke ( stringObj , methodArgs ) ; } catch ( Exception e ) { logger . error ( "Exception while invoking string method-" , e ) ; } return value ; }
given a method name and its arguments , invoke the method and return its results .
