@Override protected void handleAnnotations(final DeploymentUnit deploymentUnit, final EEApplicationClasses applicationClasses, final DeploymentReflectionIndex deploymentReflectionIndex, final Class<?> componentClass, final EJBComponentDescription description) throws DeploymentUnitProcessingException { final EEModuleClassDescription clazz = applicationClasses.getClassByName(componentClass.getName()); //we only care about annotations on the bean class itself if (clazz == null) { return; } final ClassAnnotationInformation<DeclareRoles, String[]> declareRoles = clazz.getAnnotationInformation(DeclareRoles.class); if (declareRoles == null) { return; } if (!declareRoles.getClassLevelAnnotations().isEmpty()) { description.addDeclaredRoles(declareRoles.getClassLevelAnnotations().get(0)); } }
ClassAnnotationInformation<A, T> information = new ClassAnnotationInformation<A, T>(annotationType, classData, methodData, fieldData); ret.put(clazz.toString(), information);
public void addAnnotationInformation(ClassAnnotationInformation annotationInformation) { this.annotationInformation.put(annotationInformation.getAnnotationType(), annotationInformation); }
if (annotationData != null) { if (!annotationData.getClassLevelAnnotations().isEmpty()) { classAnnotations.put(c.getName(), annotationData.getClassLevelAnnotations()); for (Map.Entry<MethodIdentifier, List<T>> entry : annotationData.getMethodLevelAnnotations().entrySet()) { final Method method = classIndex.getMethod(entry.getKey()); if (method != null) {
if (annotationData != null) { if (!annotationData.getClassLevelAnnotations().isEmpty()) { classAnnotations.put(c.getName(), annotationData.getClassLevelAnnotations()); for (Map.Entry<MethodIdentifier, List<T>> entry : annotationData.getMethodLevelAnnotations().entrySet()) { final Method method = classIndex.getMethod(entry.getKey()); if (method != null) {
@Override protected void handleAnnotations(final DeploymentUnit deploymentUnit, final EEApplicationClasses applicationClasses, final DeploymentReflectionIndex deploymentReflectionIndex, final Class<?> componentClass, final SessionBeanComponentDescription componentConfiguration) throws DeploymentUnitProcessingException { final EEModuleClassDescription clazz = applicationClasses.getClassByName(componentClass.getName()); //we only care about annotations on the bean class itself if (clazz == null) { return; } ClassAnnotationInformation<ConcurrencyManagement, ConcurrencyManagementType> management = clazz.getAnnotationInformation(ConcurrencyManagement.class); if (management == null) { return; } if (!management.getClassLevelAnnotations().isEmpty()) { componentConfiguration.setConcurrencyManagementType(management.getClassLevelAnnotations().get(0)); } }
if (annotationData != null) { if (!annotationData.getClassLevelAnnotations().isEmpty()) { classAnnotations.put(c.getName(), annotationData.getClassLevelAnnotations()); for (Map.Entry<MethodIdentifier, List<T>> entry : annotationData.getMethodLevelAnnotations().entrySet()) { final Method method = classIndex.getMethod(entry.getKey()); if (method != null) {
public void addAnnotationInformation(ClassAnnotationInformation annotationInformation) { this.annotationInformation.put(annotationInformation.getAnnotationType(), annotationInformation); }
ClassAnnotationInformation<A, T> information = new ClassAnnotationInformation<A, T>(annotationType, classData, methodData, fieldData); ret.put(clazz.toString(), information);
@Override protected void handleAnnotations(final DeploymentUnit deploymentUnit, final EEApplicationClasses applicationClasses, final DeploymentReflectionIndex deploymentReflectionIndex, final Class<?> componentClass, final MessageDrivenComponentDescription componentConfiguration) throws DeploymentUnitProcessingException { final EEModuleClassDescription clazz = applicationClasses.getClassByName(componentClass.getName()); //we only care about annotations on the bean class itself if (clazz == null) { return; } final ClassAnnotationInformation<DeliveryActive, Boolean> deliveryActive = clazz.getAnnotationInformation(DeliveryActive.class); if (deliveryActive != null) { if (!deliveryActive.getClassLevelAnnotations().isEmpty()) { componentConfiguration.setDeliveryActive(deliveryActive.getClassLevelAnnotations().get(0)); } } final ClassAnnotationInformation<DeliveryGroup, String> deliveryGroup = clazz.getAnnotationInformation(DeliveryGroup.class); if (deliveryGroup != null) { if (!deliveryGroup.getClassLevelAnnotations().isEmpty()) { componentConfiguration.setDeliveryGroup(deliveryGroup.getClassLevelAnnotations().get(0)); } } }
if (annotationData != null) { if (!annotationData.getClassLevelAnnotations().isEmpty()) { classAnnotations.put(c.getName(), annotationData.getClassLevelAnnotations()); for (Map.Entry<MethodIdentifier, List<T>> entry : annotationData.getMethodLevelAnnotations().entrySet()) { final Method method = classIndex.getMethod(entry.getKey()); if (method != null) {
public void addAnnotationInformation(ClassAnnotationInformation annotationInformation) { this.annotationInformation.put(annotationInformation.getAnnotationType(), annotationInformation); }
ClassAnnotationInformation<A, T> information = new ClassAnnotationInformation<A, T>(annotationType, classData, methodData, fieldData); ret.put(clazz.toString(), information);
@Override protected void handleAnnotations(final DeploymentUnit deploymentUnit, final EEApplicationClasses applicationClasses, final DeploymentReflectionIndex deploymentReflectionIndex, final Class<?> componentClass, final EJBComponentDescription componentConfiguration) throws DeploymentUnitProcessingException { final EEModuleClassDescription clazz = applicationClasses.getClassByName(componentClass.getName()); //we only care about annotations on the bean class itself if (clazz == null) { return; } ClassAnnotationInformation<TransactionManagement, TransactionManagementType> management = clazz.getAnnotationInformation(TransactionManagement.class); if (management == null) { return; } if (!management.getClassLevelAnnotations().isEmpty()) { componentConfiguration.setTransactionManagementType(management.getClassLevelAnnotations().get(0)); } }
public void addAnnotationInformation(ClassAnnotationInformation annotationInformation) { this.annotationInformation.put(annotationInformation.getAnnotationType(), annotationInformation); }
ClassAnnotationInformation<A, T> information = new ClassAnnotationInformation<A, T>(annotationType, classData, methodData, fieldData); ret.put(clazz.toString(), information);
@Override protected void handleAnnotations(final DeploymentUnit deploymentUnit, final EEApplicationClasses applicationClasses, final DeploymentReflectionIndex deploymentReflectionIndex, final Class<?> componentClass, final StatefulComponentDescription componentConfiguration) throws DeploymentUnitProcessingException { final EEModuleClassDescription clazz = applicationClasses.getClassByName(componentClass.getName()); //we only care about annotations on the bean class itself if (clazz == null) { return; } final ClassAnnotationInformation<StatefulTimeout, StatefulTimeoutInfo> timeout = clazz.getAnnotationInformation(StatefulTimeout.class); if (timeout == null) { return; } if (!timeout.getClassLevelAnnotations().isEmpty()) { componentConfiguration.setStatefulTimeout(timeout.getClassLevelAnnotations().get(0)); } }
@Override protected void handleAnnotations(DeploymentUnit deploymentUnit, EEApplicationClasses applicationClasses, DeploymentReflectionIndex deploymentReflectionIndex, Class<?> componentClass, StatefulComponentDescription componentConfiguration) throws DeploymentUnitProcessingException { final EEModuleClassDescription clazz = applicationClasses.getClassByName(componentClass.getName()); //we only care about annotations on the bean class itself if (clazz == null) { return; } final ClassAnnotationInformation<Cache, CacheInfo> cache = clazz.getAnnotationInformation(Cache.class); if (cache == null) { return; } if (!cache.getClassLevelAnnotations().isEmpty()) { componentConfiguration.setCache(cache.getClassLevelAnnotations().get(0)); } }
@Override protected void handleAnnotations(final DeploymentUnit deploymentUnit, final EEApplicationClasses applicationClasses, final DeploymentReflectionIndex deploymentReflectionIndex, final Class<?> componentClass, final MessageDrivenComponentDescription componentConfiguration) throws DeploymentUnitProcessingException { final EEModuleClassDescription clazz = applicationClasses.getClassByName(componentClass.getName()); //we only care about annotations on the bean class itself if (clazz == null) { return; } final ClassAnnotationInformation<ResourceAdapter, String> resourceAdapter = clazz.getAnnotationInformation(ResourceAdapter.class); if (resourceAdapter == null || resourceAdapter.getClassLevelAnnotations().isEmpty()) { return; } final String configuredAdapterName = resourceAdapter.getClassLevelAnnotations().get(0); final String adapterName = addEarPrefixIfRelativeName(configuredAdapterName, deploymentUnit, componentClass); componentConfiguration.setResourceAdapterName(adapterName); }
@Override protected void handleAnnotations(final DeploymentUnit deploymentUnit, final EEApplicationClasses applicationClasses, final DeploymentReflectionIndex deploymentReflectionIndex, final Class<?> componentClass, final EJBComponentDescription description) throws DeploymentUnitProcessingException { final EEModuleClassDescription clazz = applicationClasses.getClassByName(componentClass.getName()); //we only care about annotations on the bean class itself if (clazz == null) { return; } final ClassAnnotationInformation<SecurityDomain, String> securityDomain = clazz.getAnnotationInformation(SecurityDomain.class); if (securityDomain == null) { return; } if (!securityDomain.getClassLevelAnnotations().isEmpty()) { if (ROOT_LOGGER.isDebugEnabled()) { ROOT_LOGGER.debug("EJB " + description.getEJBName() + " is part of security domain " + securityDomain.getClassLevelAnnotations().get(0)); } description.setSecurityDomain(securityDomain.getClassLevelAnnotations().get(0)); } }