/** * Process a particular annotation which type is the same as the * one returned by @see getAnnotationType(). All information * pertinent to the annotation and its context is encapsulated * in the passed AnnotationInfo instance. * * @param ainfo the annotation information * @param rcContexts an array of ResourceContainerContext * @return HandlerProcessingResult */ protected HandlerProcessingResult processAnnotation(AnnotationInfo ainfo, ResourceContainerContext[] rcContexts) throws AnnotationProcessorException { AnnotatedElementHandler aeHandler = ainfo.getProcessingContext().getHandler(); if (aeHandler instanceof AppClientContext) { // application client does not support @PersistenceContext String msg = localStrings.getLocalString( "enterprise.deployment.annotation.handlers.invalidaehandler", "Invalid annotation symbol found for this type of class."); log(Level.WARNING, ainfo, msg); return getDefaultProcessedResult(); } PersistenceContext emRefAn = (PersistenceContext)ainfo.getAnnotation(); return processEmRef(ainfo, rcContexts, emRefAn); }
emRefs = getEmReferenceDescriptors(logicalName, rcContexts); processNewEmRefAnnotation(emRef, logicalName, emRefAn); getInjectionMethodPropertyName(m, ainfo); validateInjectionMethod(m, ainfo); emRefs = getEmReferenceDescriptors(logicalName, rcContexts); processNewEmRefAnnotation(emRef, logicalName, emRefAn); log(Level.SEVERE, ainfo, localStrings.getLocalString( "enterprise.deployment.annotation.handlers.nonametypelevel", "TYPE-Level annotation symbol on class must specify name.")); return getDefaultFailedResult(); emRefs = getEmReferenceDescriptors(logicalName, rcContexts); for (EntityManagerReferenceDescriptor emRef : emRefs) { if (emRef.getName().length() == 0) { // a new one processNewEmRefAnnotation(emRef, logicalName, emRefAn); return getDefaultProcessedResult();
emRefs = getEmReferenceDescriptors(logicalName, rcContexts); processNewEmRefAnnotation(emRef, logicalName, emRefAn); getInjectionMethodPropertyName(m, ainfo); validateInjectionMethod(m, ainfo); emRefs = getEmReferenceDescriptors(logicalName, rcContexts); processNewEmRefAnnotation(emRef, logicalName, emRefAn); log(Level.SEVERE, ainfo, localStrings.getLocalString( "enterprise.deployment.annotation.handlers.nonametypelevel", "TYPE-Level annotation symbol on class must specify name.")); return getDefaultFailedResult(); emRefs = getEmReferenceDescriptors(logicalName, rcContexts); for (EntityManagerReferenceDescriptor emRef : emRefs) { if (emRef.getName().length() == 0) { // a new one processNewEmRefAnnotation(emRef, logicalName, emRefAn); return getDefaultProcessedResult();
/** * Process a particular annotation which type is the same as the * one returned by @see getAnnotationType(). All information * pertinent to the annotation and its context is encapsulated * in the passed AnnotationInfo instance. * * @param ainfo the annotation information * @param rcContexts an array of ResourceContainerContext * @return HandlerProcessingResult */ protected HandlerProcessingResult processAnnotation(AnnotationInfo ainfo, ResourceContainerContext[] rcContexts) throws AnnotationProcessorException { AnnotatedElementHandler aeHandler = ainfo.getProcessingContext().getHandler(); if (aeHandler instanceof AppClientContext) { // application client does not support @PersistenceContext String msg = localStrings.getLocalString( "enterprise.deployment.annotation.handlers.invalidaehandler", "Invalid annotation symbol found for this type of class."); log(Level.WARNING, ainfo, msg); return getDefaultProcessedResult(); } PersistenceContext emRefAn = (PersistenceContext)ainfo.getAnnotation(); return processEmRef(ainfo, rcContexts, emRefAn); }