For IntelliJ IDEA,
Android Studio or Eclipse



/** * Process {@link InputConfig} annotation applied to method */ protected String processInputConfig(final Object action, final String method, final String currentResultName) throws Exception { String resultName = currentResultName; InputConfig annotation = action.getClass().getMethod(method, EMPTY_CLASS_ARRAY).getAnnotation(InputConfig.class); if (annotation != null) { if (!annotation.methodName().equals("")) { Method m = action.getClass().getMethod(annotation.methodName()); resultName = (String) m.invoke(action); } else { resultName = annotation.resultName(); } if (LOG.isDebugEnabled()) { LOG.debug("Changing result name from [#0] to [#1] because of processing annotation [#2] on action [#3]", currentResultName, resultName, InputConfig.class.getSimpleName(), action); } } return resultName; }
/** * Process {@link InputConfig} annotation applied to method * @param action action object * @param method method * @param currentResultName current result name * * @return result name * * @throws Exception in case of any errors */ protected String processInputConfig(final Object action, final String method, final String currentResultName) throws Exception { String resultName = currentResultName; InputConfig annotation = MethodUtils.getAnnotation(action.getClass().getMethod(method, EMPTY_CLASS_ARRAY), InputConfig.class ,true,true); if (annotation != null) { if (StringUtils.isNotEmpty(annotation.methodName())) { resultName = (String) MethodUtils.invokeMethod(action, true, annotation.methodName()); } else { resultName = annotation.resultName(); } LOG.debug("Changing result name from [{}] to [{}] because of processing annotation [{}] on action [{}]", currentResultName, resultName, InputConfig.class.getSimpleName(), action); } return resultName; }
if (!annotation.methodName().equals("")) { Method method = action.getClass().getMethod(annotation.methodName()); resultName = (String) method.invoke(action); } else { resultName = annotation.resultName();
/** * Process {@link InputConfig} annotation applied to method * @param action action object * @param method method * @param currentResultName current result name * * @return result name * * @throws Exception in case of any errors */ protected String processInputConfig(final Object action, final String method, final String currentResultName) throws Exception { String resultName = currentResultName; InputConfig annotation = MethodUtils.getAnnotation(action.getClass().getMethod(method, EMPTY_CLASS_ARRAY), InputConfig.class ,true,true); if (annotation != null) { if (StringUtils.isNotEmpty(annotation.methodName())) { resultName = (String) MethodUtils.invokeMethod(action, true, annotation.methodName()); } else { resultName = annotation.resultName(); } LOG.debug("Changing result name from [{}] to [{}] because of processing annotation [{}] on action [{}]", currentResultName, resultName, InputConfig.class.getSimpleName(), action); } return resultName; }
if (!annotation.methodName().equals("")) { Method method = action.getClass().getMethod(annotation.methodName()); resultName = (String) method.invoke(action); } else { resultName = annotation.resultName();