How to capture the value returned by the method called by getBean() method

... ... ... applicationContext.getBean(JavaClass.class).run(args); ... ... ... String run(String[] args){ ... ... ... return "String"; }

How to capture the value returned by the run(String) method?