Start line:  
End line:  

Snippet Preview

Snippet HTML Code

Stack Overflow Questions
 /*    */ package org.jboss.aspects.remoting;
 /*    */ 
 /*    */ import java.lang.reflect.Method;
 /*    */ import java.util.HashMap;
 /*    */ import org.jboss.aop.advice.Interceptor;
 /*    */ import org.jboss.aop.joinpoint.Invocation;
/*    */ 
/*    */ public class ForwardingInterceptor
/*    */   implements InterceptorClusterConstants
/*    */ {
/*    */   private final Object obj;
/*    */ 
/*    */   public ForwardingInterceptor(Object obj)
/*    */   {
/* 42 */     this. = obj;
/*    */   }
/*    */   public String getName() {
/* 45 */     return "ForwardingInterceptor";
/*    */   }
/*    */ 
/*    */   public Object invoke(Invocation invocationthrows Throwable {
/* 49 */     if ((invocation instanceof MethodInvocation))
/*    */     {
/* 52 */       MethodInvocation methodInvocation = (MethodInvocation)invocation;
/* 53 */       long methodHash = methodInvocation.getMethodHash();
/* 54 */       HashMap methodMap = ClassProxyFactory.getMethodMap(this..getClass());
/* 55 */       MethodPersistentReference ref = (MethodPersistentReference)methodMap.get(new Long(methodHash));
/* 56 */       Method method = (Method)ref.get();
/* 57 */       Object[] args = methodInvocation.getArguments();
/*    */       try
/*    */       {
/* 60 */         return method.invoke(this.args);
/*    */       }
/*    */       catch (InvocationTargetException ex)
/*    */       {
/* 64 */         throw ex.getTargetException();
/*    */       }
/*    */ 
/*    */     }
/*    */ 
/* 69 */     throw new RuntimeException("field invocations not implemented");
/*    */   }
/*    */ }
/* Location:           /home/mnovotny/projects/EMBEDDED_JBOSS_BETA3_COMMUNITY/embedded/output/lib/embedded-jboss/lib/jboss-embedded-all.jar
 * Qualified Name:     org.jboss.aspects.remoting.ForwardingInterceptor
 * JD-Core Version:    0.6.0
 */
New to GrepCode? Check out our FAQ X