Package org.jboss.metadata.annotation.creator.ejb

Source Code of org.jboss.metadata.annotation.creator.ejb.TimeoutProcessor

/*    */ package org.jboss.metadata.annotation.creator.ejb;
/*    */
/*    */ import java.lang.reflect.AnnotatedElement;
/*    */ import java.lang.reflect.Method;
/*    */ import javax.ejb.Timeout;
/*    */ import org.jboss.metadata.annotation.creator.AbstractFinderUser;
/*    */ import org.jboss.metadata.annotation.creator.Processor;
/*    */ import org.jboss.metadata.annotation.creator.ProcessorUtils;
/*    */ import org.jboss.metadata.annotation.finder.AnnotationFinder;
/*    */ import org.jboss.metadata.common.ejb.ITimeoutTarget;
/*    */ import org.jboss.metadata.ejb.spec.NamedMethodMetaData;
/*    */
/*    */ public class TimeoutProcessor extends AbstractFinderUser
/*    */   implements Processor<ITimeoutTarget, Method>
/*    */ {
/*    */   public TimeoutProcessor(AnnotationFinder<AnnotatedElement> finder)
/*    */   {
/* 47 */     super(finder);
/*    */   }
/*    */
/*    */   public void process(ITimeoutTarget bean, Method method)
/*    */   {
/* 52 */     Timeout timeout = (Timeout)this.finder.getAnnotation(method, Timeout.class);
/* 53 */     if (timeout == null) {
/* 54 */       return;
/*    */     }
/* 56 */     NamedMethodMetaData timeoutMethod = new NamedMethodMetaData();
/* 57 */     timeoutMethod.setMethodName(method.getName());
/* 58 */     timeoutMethod.setMethodParams(ProcessorUtils.getMethodParameters(method));
/* 59 */     bean.setTimeoutMethod(timeoutMethod);
/*    */   }
/*    */ }

/* Location:           /home/mnovotny/projects/EMBEDDED_JBOSS_BETA3_COMMUNITY/embedded/output/lib/embedded-jboss/lib/jboss-embedded-all.jar
* Qualified Name:     org.jboss.metadata.annotation.creator.ejb.TimeoutProcessor
* JD-Core Version:    0.6.0
*/
TOP

Related Classes of org.jboss.metadata.annotation.creator.ejb.TimeoutProcessor

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.