@Dependent @ActivatedBy(TestBeanActivator.class) public class ActivatedBeanWithInterface implements ActivatedBeanInterface { }
protected Statement generateFactoryHandleStatement(final Injectable injectable) { final Statement newObject; if (injectable.getInjectedType().isAnnotationPresent(ActivatedBy.class)) { final Class<? extends BeanActivator> activatorType = injectable.getInjectedType().getAnnotation(ActivatedBy.class).value(); newObject = newObject(FactoryHandleImpl.class, loadLiteral(injectable.getInjectedType()), injectable.getFactoryName(), injectable.getScope(), isEager(injectable.getInjectedType()), injectable.getBeanName(), !injectable.isContextual(), loadLiteral(activatorType)); } else { newObject = newObject(FactoryHandleImpl.class, loadLiteral(injectable.getInjectedType()), injectable.getFactoryName(), injectable.getScope(), isEager(injectable.getInjectedType()), injectable.getBeanName(), !injectable.isContextual()); } return newObject; }
@Override protected Statement generateFactoryHandleStatement(final Injectable injectable) { final Object[] args; if (injectable.getInjectedType().isAnnotationPresent(ActivatedBy.class)) { final Class<? extends BeanActivator> activatorType = injectable.getInjectedType().getAnnotation(ActivatedBy.class).value(); args = new Object[] { loadLiteral(injectable.getInjectedType()), injectable.getFactoryName(), injectable.getScope(), isEager(injectable.getInjectedType()), injectable.getBeanName(), loadLiteral(false), loadLiteral(activatorType) }; } else { args = new Object[] { loadLiteral(injectable.getInjectedType()), injectable.getFactoryName(), injectable.getScope(), isEager(injectable.getInjectedType()), injectable.getBeanName(), loadLiteral(false) }; } return newObject(FactoryHandleImpl.class, args); }
@Dependent @ActivatedBy(TestBeanActivator.class) public class ActivatedBean { }
@WorkbenchEditor(identifier = "test18", supportedTypes = { MyTestType.class }) @ActivatedBy(TestBeanActivator.class) public class WorkbenchEditorTest18 { @WorkbenchPartView public IsWidget getView() { return new SimplePanel(); } @WorkbenchPartTitle public String getTitle() { return "title"; } }
@WorkbenchScreen(identifier = "test19") @ActivatedBy(TestBeanActivator.class) public class WorkbenchScreenTest19 { @WorkbenchPartView public IsWidget getView() { return new SimplePanel(); } @WorkbenchPartTitle public String getTitle() { return "title"; } }
@WorkbenchPopup(identifier = "test12") @ActivatedBy(TestBeanActivator.class) public class WorkbenchPopupTest12 { @WorkbenchPartTitle public String getTitle() { return "title"; } @WorkbenchPartView public PopupPanel getView() { return new PopupPanel(); } }
@WorkbenchPerspective(identifier = "PerspectiveTest20") @ActivatedBy(TestBeanActivator.class) public class PerspectiveTest20 { @Perspective public PerspectiveDefinition getPerspective() { return null; } }
@WorkbenchSplashScreen(identifier = "test9", isEnabled = false) @ActivatedBy(TestBeanActivator.class) public class WorkbenchSplashScreenTest9 { @WorkbenchPartView public IsWidget getView() { return new SimplePanel(); } @WorkbenchPartTitle public String getTitle() { return "title"; } @SplashFilter public SplashScreenFilter getFilter() { return null; } }
@WorkbenchSplashScreen(identifier = "test7") @ActivatedBy(TestBeanActivator.class) public class WorkbenchSplashScreenTest7 { @WorkbenchPartView public IsWidget getView() { return new SimplePanel(); } @WorkbenchPartTitle public String getTitle() { return "title"; } @SplashFilter public SplashScreenFilter getFilter() { return null; } }