private void configureDecorators(URL bdaLocation, List<String> decorators) { Set<Class> decoratorsInFile = new HashSet<>(); for (String decorator : decorators) { Class<?> clazz = ClassUtil.getClassFromName(decorator); if (clazz == null) { throw new WebBeansDeploymentException(createConfigurationFailedMessage(bdaLocation) + "Decorator class : " + decorator + " not found"); } else { if ((scannerService.isBDABeansXmlScanningEnabled() && !scannerService.getBDABeansXmlScanner().addDecorator(clazz, bdaLocation.toExternalForm())) || decoratorsInFile.contains(clazz)) { throw new WebBeansDeploymentException(createConfigurationFailedMessage(bdaLocation) + "Decorator class : " + decorator + " is already defined"); } decoratorsManager.addEnabledDecorator(clazz); decoratorsInFile.add(clazz); } } }
throw new WebBeansDeploymentException(createConfigurationFailedMessage(bdaLocation) + "Given alternative : " + alternativeName + " is already added as @Alternative" ); throw new WebBeansDeploymentException(createConfigurationFailedMessage(bdaLocation) + "Alternative: " + alternativeName + " not found");
throw new WebBeansDeploymentException(createConfigurationFailedMessage(bdaLocation) + "Interceptor class : " + interceptor + " not found"); !webBeansContext.getAnnotationManager().hasInterceptorBindingMetaAnnotation(classAnnotations)) throw new WebBeansDeploymentException(createConfigurationFailedMessage(bdaLocation) + "Interceptor class : " + interceptor + " must have at least one @InterceptorBinding"); throw new WebBeansDeploymentException(createConfigurationFailedMessage(bdaLocation) + "Interceptor class : " + interceptor + " already defined in this beans.xml file!");