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); } } }
if (scannerService.isBDABeansXmlScanningEnabled())
boolean isBDAScanningEnabled = scannerService.isBDABeansXmlScanningEnabled(); if ((!isBDAScanningEnabled && interceptorsManager.isInterceptorClassEnabled(clazz)) || (isBDAScanningEnabled && !scannerService.getBDABeansXmlScanner().addInterceptor(clazz, bdaLocation.toExternalForm())))