NavigateForward navigate = (NavigateForward) annotation;
Class factory = navigate.handler();
if (NavigationHandlerFactory.class.isAssignableFrom(factory))
{
NavigationHandlerFactory factoryInstance = ReflectHelper.createInstance(factory,
NavigationHandlerFactory.class);
return new NavigationHandlerInfo(factoryInstance, containingMethod);
}
else if (NavigationHandler.class.isAssignableFrom(factory))
{
NavigationHandler handler = ReflectHelper.createInstance(factory, NavigationHandler.class);
NavigationHandlerFactory factoryInstance = new IdentityNavigationHandlerFactory(handler);
return new NavigationHandlerInfo(factoryInstance, containingMethod);
}
else
{
throw new ApplicationConfigurationException(actionClass.getName() + ", method "