/** * 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); }
/** * 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); }