Examples of ScopeInfo


Examples of br.com.caelum.vraptor.ioc.cdi.ScopeInfo

    final AnnotatedType defaultType = pat.getAnnotatedType();
    if (pat.getAnnotatedType().getJavaClass()
        .isAnnotationPresent(Component.class)) {
      builder.readFromType(defaultType);
      ScopesUtil registry = new ScopesUtil();
      ScopeInfo scopeInfoFromTheClass = registry.isScoped(defaultType
          .getJavaClass());
      if (!scopeInfoFromTheClass.hasScope()) {
        builder.addToClass(new ScopeInfo(RequestScoped.class)
            .getLiteral());
        AnnotatedType annotatedType = builder.create();
        pat.setAnnotatedType(annotatedType);
      }
    }
View Full Code Here

Examples of com.mossle.scope.domain.ScopeInfo

    @RequestMapping("scope-info-input")
    public String input(@RequestParam(value = "id", required = false) Long id,
            Model model) {
        if (id != null) {
            ScopeInfo scopeInfo = scopeInfoManager.get(id);
            model.addAttribute("model", scopeInfo);
        }

        List<UserRepoDTO> userRepoDtos = userRepoConnector.findAll();
        model.addAttribute("userRepoDtos", userRepoDtos);
View Full Code Here

Examples of com.mossle.scope.domain.ScopeInfo

    @RequestMapping("scope-info-save")
    public String save(@ModelAttribute ScopeInfo scopeInfo,
            RedirectAttributes redirectAttributes) {
        Long id = scopeInfo.getId();
        ScopeInfo dest = null;

        if (id != null) {
            dest = scopeInfoManager.get(id);
            beanMapper.copy(scopeInfo, dest);
        } else {
View Full Code Here

Examples of com.mossle.scope.domain.ScopeInfo

        if (id != null) {
            hql = "from ScopeInfo where name=? and id<>?";
            params = new Object[] { name, id };
        }

        ScopeInfo scopeInfo = scopeInfoManager.findUnique(hql, params);

        boolean result = (scopeInfo == null);

        return result;
    }
View Full Code Here

Examples of org.glassfish.hk2.utilities.reflection.ScopeInfo

        }
       
        qualifiers = getAllQualifiers(clazz, name, collector)// Fixes the @Named qualifier if it has no value

        contracts = getAutoAdvertisedTypes(clazz);
        ScopeInfo scopeInfo = getScopeInfo(clazz, null, collector);
        scope = scopeInfo.getAnnoType();
        analyzerName = getAutoAnalyzerName(clazz);

        creator = new ClazzCreator<T>(locator, clazz);

        collector.throwIfErrors();

        Map<String, List<String>> metadata = new HashMap<String, List<String>>();
        if (scopeInfo.getScope() != null) {
            BuilderHelper.getMetadataValues(scopeInfo.getScope(), metadata);
        }

        for (Annotation qualifier : qualifiers) {
            BuilderHelper.getMetadataValues(qualifier, metadata);
        }
View Full Code Here

Examples of org.glassfish.hk2.utilities.reflection.ScopeInfo

                }
            }
        }

        if (winnerScope != null) {
            return new ScopeInfo(winnerScope, winnerScope.annotationType());
        }


        if (topLevelElement.isAnnotationPresent(Service.class)) {
            return new ScopeInfo(null, Singleton.class);
        }

        if (defaultScope != null && defaultScope.getScope() != null) {
            Class<? extends Annotation> descScope = (Class<? extends Annotation>)
                    loadClass(defaultScope.getScope(), defaultScope, collector);
            if (descScope != null) {
                return new ScopeInfo(null, descScope);
            }
        }

        return new ScopeInfo(null, PerLookup.class);

    }
View Full Code Here

Examples of org.glassfish.hk2.utilities.reflection.ScopeInfo

    public static Class<? extends Annotation> getScopeAnnotationType(
            Class<?> fromThis,
            Descriptor defaultScope) {
        Collector collector = new Collector();

        ScopeInfo si = getScopeInfo(fromThis, defaultScope, collector);

        collector.throwIfErrors();

        return si.getAnnoType();
    }
View Full Code Here

Examples of org.glassfish.hk2.utilities.reflection.ScopeInfo

     */
    public static Class<? extends Annotation> getScopeAnnotationType(
            AnnotatedElement annotatedGuy,
            Descriptor defaultScope,
            Collector collector) {
        ScopeInfo si = getScopeInfo(annotatedGuy, defaultScope, collector);
        return si.getAnnoType();
    }
View Full Code Here

Examples of org.jboss.dependency.spi.ScopeInfo

               log.debug("Unable to retrieve classloader for deployment: " + unit.getName() + " reason=" + e.toString());
            }
         }
         KernelControllerContext context = new AbstractKernelControllerContext(null, deployment, null);
         //Make sure that the metadata from the deployment gets put into the context
         ScopeInfo scopeInfo = context.getScopeInfo();
         if (scopeInfo != null)
         {
            mergeScopes(scopeInfo.getScope(), unit.getScope());
            mergeScopes(scopeInfo.getMutableScope(), unit.getMutableScope());
         }
        
//         KernelControllerContext context = new AbstractKernelControllerContext(null, deployment, null);
//         ScopeInfo scopeInfo2 = context.getScopeInfo();
//         if (scopeInfo2 != null)
View Full Code Here

Examples of org.jboss.dependency.spi.ScopeInfo

         {
            log.debug("Unable to retrieve classloader for deployment: " + unit.getName() + " reason=" + e.toString());
         }
      }
      KernelControllerContext context = new AbstractKernelControllerContext(null, deployment, null);
      ScopeInfo scopeInfo = context.getScopeInfo();
      scopeInfo.setScope(unit.getScope());
      scopeInfo.setMutableScope(unit.getMutableScope());

      try
      {
         // move this before install, so FromDeployment can access it
         putContext(context, unit.getParent()); // we're a component, use parent
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.