protected WindowInfo getScreenInfo(Class<? extends Screen> screenClass) { UiController uiController = screenClass.getAnnotation(UiController.class); if (uiController == null) { throw new IllegalArgumentException("No @UiController annotation for class " + screenClass); } String screenId = UiDescriptorUtils.getInferredScreenId(uiController, screenClass); return windowConfig.getWindowInfo(screenId); }
template = null; } else { String templatePath = UiDescriptorUtils.getInferredTemplate(annotation, controllerClass); if (!templatePath.startsWith("/")) { String packageName = UiControllerUtils.getPackage(controllerClass);
@Nullable protected Object getInstallTargetInstance(FrameOwner frameOwner, Install annotation, Frame frame) { Object targetInstance; String target = UiDescriptorUtils.getInferredProvideId(annotation); if (Strings.isNullOrEmpty(target)) {
Subscribe annotation = annotatedMethod.getAnnotation(); String target = UiDescriptorUtils.getInferredSubscribeId(annotation);
protected <T extends ScreenFragment> WindowInfo getFragmentInfo(Class<T> fragmentClass) { UiController uiController = fragmentClass.getAnnotation(UiController.class); if (uiController == null) { throw new IllegalArgumentException("No @UiController annotation for class " + fragmentClass); } String screenId = UiDescriptorUtils.getInferredScreenId(uiController, fragmentClass); return windowConfig.getWindowInfo(screenId); }
public static String getInferredScreenId(UiController uiController, Class<? extends FrameOwner> annotatedScreenClass) { checkNotNullArgument(uiController); checkNotNullArgument(annotatedScreenClass); return getInferredScreenId(uiController.id(), uiController.value(), annotatedScreenClass.getName()); }
protected UiControllerDefinition extractControllerDefinition(MetadataReader metadataReader) { Map<String, Object> uiControllerAnn = metadataReader.getAnnotationMetadata().getAnnotationAttributes(UiController.class.getName()); String idAttr = null; String valueAttr = null; if (uiControllerAnn != null) { idAttr = (String) uiControllerAnn.get(UiController.ID_ATTRIBUTE); valueAttr = (String) uiControllerAnn.get(UiController.VALUE_ATTRIBUTE); } String className = metadataReader.getClassMetadata().getClassName(); String controllerId = UiDescriptorUtils.getInferredScreenId(idAttr, valueAttr, className); RouteDefinition routeDefinition = extractRouteDefinition(metadataReader); return new UiControllerDefinition(controllerId, className, routeDefinition); }