public int compare(Method method1, Method method2) { return comparePriorities(method1.getAnnotation(Before.class).priority(), method2.getAnnotation(Before.class).priority()); } });
public int compare(Method method1, Method method2) { return comparePriorities(method1.getAnnotation(After.class).priority(), method2.getAnnotation(After.class).priority()); } });
public int compare(Method method1, Method method2) { return comparePriorities(method1.getAnnotation(BeforeResult.class).priority(), method2.getAnnotation(BeforeResult.class).priority()); } });
/** * 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; }
@After public void tearDown() throws Exception { super.tearDown(); if (dispatcher != null && dispatcher.getConfigurationManager() != null) { dispatcher.cleanup(); dispatcher = null; } StrutsTestCaseHelper.tearDown(); }
/** * Sets up the configuration settings, XWork configuration, and * message resources */ @Before public void setUp() throws Exception { super.setUp(); initServletMockObjects(); setupBeforeInitDispatcher(); initDispatcherParams(); initDispatcher(dispatcherInitParams); }