@Override public Class<? extends Annotation> getScope() { /* * Resource class without the Scope annotation should registered as a RequestScoped. */ if (isResourceClass(binding.getService()) && binding.getScope() == null) { return RequestScoped.class; } return binding.getScope() == null ? Dependent.class : transformScope(binding.getScope()); }
static ActiveDescriptor<?> translateToActiveDescriptor(ClassBinding<?> desc) { ActiveDescriptorBuilder binding = BuilderHelper.activeLink(desc.getService()).named(desc.getName()) .analyzeWith(desc.getAnalyzer()); if (desc.getScope() != null) { binding.in(transformScope(desc.getScope())); } if (desc.getRank() != null) { binding.ofRank(desc.getRank()); } for (Annotation annotation : desc.getQualifiers()) { binding.qualifiedBy(annotation); } for (Type contract : desc.getContracts()) { binding.to(contract); } if (desc.isProxiable() != null) { binding.proxy(desc.isProxiable()); } if (desc.isProxiedForSameScope() != null) { binding.proxyForSameScope(desc.isProxiedForSameScope()); } if (desc.getImplementationType() != null) { binding.asType(desc.getImplementationType()); } return binding.build(); }
static ActiveDescriptor<?> translateToActiveDescriptor(ClassBinding<?> desc) { ActiveDescriptorBuilder binding = BuilderHelper.activeLink(desc.getService()).named(desc.getName()) .analyzeWith(desc.getAnalyzer()); if (desc.getScope() != null) { binding.in(transformScope(desc.getScope())); } if (desc.getRank() != null) { binding.ofRank(desc.getRank()); } for (Annotation annotation : desc.getQualifiers()) { binding.qualifiedBy(annotation); } for (Type contract : desc.getContracts()) { binding.to(contract); } if (desc.isProxiable() != null) { binding.proxy(desc.isProxiable()); } if (desc.isProxiedForSameScope() != null) { binding.proxyForSameScope(desc.isProxiedForSameScope()); } if (desc.getImplementationType() != null) { binding.asType(desc.getImplementationType()); } return binding.build(); }
static ActiveDescriptor<?> translateToActiveDescriptor(ClassBinding<?> desc) { ActiveDescriptorBuilder binding = BuilderHelper.activeLink(desc.getService()).named(desc.getName()) .analyzeWith(desc.getAnalyzer()); if (desc.getScope() != null) { binding.in(transformScope(desc.getScope())); } if (desc.getRank() != null) { binding.ofRank(desc.getRank()); } for (Annotation annotation : desc.getQualifiers()) { binding.qualifiedBy(annotation); } for (Type contract : desc.getContracts()) { binding.to(contract); } if (desc.isProxiable() != null) { binding.proxy(desc.isProxiable()); } if (desc.isProxiedForSameScope() != null) { binding.proxyForSameScope(desc.isProxiedForSameScope()); } if (desc.getImplementationType() != null) { binding.asType(desc.getImplementationType()); } return binding.build(); }
static ActiveDescriptor<?> translateToActiveDescriptor(ClassBinding<?> desc) { ActiveDescriptorBuilder binding = BuilderHelper.activeLink(desc.getService()).named(desc.getName()) .analyzeWith(desc.getAnalyzer()); if (desc.getScope() != null) { binding.in(transformScope(desc.getScope())); } if (desc.getRank() != null) { binding.ofRank(desc.getRank()); } for (Annotation annotation : desc.getQualifiers()) { binding.qualifiedBy(annotation); } for (Type contract : desc.getContracts()) { binding.to(contract); } if (desc.isProxiable() != null) { binding.proxy(desc.isProxiable()); } if (desc.isProxiedForSameScope() != null) { binding.proxyForSameScope(desc.isProxiedForSameScope()); } if (desc.getImplementationType() != null) { binding.asType(desc.getImplementationType()); } return binding.build(); }