Package org.jboss.aop.joinpoint

Examples of org.jboss.aop.joinpoint.ConstructorInvocation


         methodInvocation.getMethodHash(),
         methodInvocation.getArguments());
      }
      else if (invocation instanceof ConstructorInvocation)
      {
         ConstructorInvocation cInvocation = (ConstructorInvocation) invocation;
         Object[] arguments = cInvocation.getArguments();
         Constructor<?> constructor = cInvocation.getConstructor();
         return invokeNewWithoutAdvisement(arguments, constructor);
      }
      throw new IllegalStateException("Unknown Invocation type: " + invocation.getClass().getName());
   }
View Full Code Here


/*     */
/* 152 */       Interceptor[] interceptors = aopinfo != null ? aopinfo.getInterceptors() : null;
/*     */
/* 154 */       if (interceptors != null)
/*     */       {
/* 156 */         ConstructorInvocation inv = new ConstructorInvocation(aopinfo, aopinfo.getInterceptors());
/* 157 */         inv.setArguments(getArguments());
/* 158 */         return inv.invokeNext();
/*     */       }
/*     */
/* 161 */       if (getConstructorInfo().getParameterTypes().length > 0)
/*     */       {
/* 163 */         Constructor constructor = null;
View Full Code Here

/*     */       }
/*  64 */       return pmatch.isMatch();
/*     */     }
/*  66 */     if ((invocation instanceof ConstructorInvocation))
/*     */     {
/*  68 */       ConstructorInvocation mi = (ConstructorInvocation)invocation;
/*  69 */       return this.p.matchesExecution(mi.getAdvisor(), mi.getConstructor());
/*     */     }
/*  71 */     if ((invocation instanceof FieldReadInvocation))
/*     */     {
/*  73 */       FieldReadInvocation mi = (FieldReadInvocation)invocation;
/*  74 */       return this.p.matchesGet(mi.getAdvisor(), mi.getField());
/*     */     }
/*  76 */     if ((invocation instanceof FieldWriteInvocation))
/*     */     {
/*  78 */       FieldWriteInvocation mi = (FieldWriteInvocation)invocation;
/*  79 */       return this.p.matchesSet(mi.getAdvisor(), mi.getField());
/*     */     }
/*  81 */     if ((invocation instanceof MethodCalledByMethodInvocation))
/*     */     {
/*  83 */       MethodCalledByMethodInvocation mi = (MethodCalledByMethodInvocation)invocation;
/*  84 */       return this.p.matchesCall(mi.getAdvisor(), mi.getCallingMethod(), mi.getCalledMethod().getDeclaringClass(), mi.getCalledMethod());
/*     */     }
/*  86 */     if ((invocation instanceof MethodCalledByConstructorInvocation))
/*     */     {
/*  88 */       MethodCalledByConstructorInvocation mi = (MethodCalledByConstructorInvocation)invocation;
/*  89 */       return this.p.matchesCall(mi.getAdvisor(), mi.getCalling(), mi.getCalledMethod().getDeclaringClass(), mi.getCalledMethod());
/*     */     }
/*  91 */     if ((invocation instanceof ConstructorCalledByConstructorInvocation))
/*     */     {
/*  93 */       ConstructorCalledByConstructorInvocation mi = (ConstructorCalledByConstructorInvocation)invocation;
/*  94 */       return this.p.matchesCall(mi.getAdvisor(), mi.getCallingConstructor(), mi.getCalledConstructor().getDeclaringClass(), mi.getCalledConstructor());
/*     */     }
/*  96 */     if ((invocation instanceof ConstructorCalledByMethodInvocation))
/*     */     {
/*  98 */       ConstructorCalledByMethodInvocation mi = (ConstructorCalledByMethodInvocation)invocation;
/*  99 */       return this.p.matchesCall(mi.getAdvisor(), mi.getCallingMethod(), mi.getCalledConstructor().getDeclaringClass(), mi.getCalledConstructor());
/*     */     }
/* 101 */     throw new RuntimeException("UNKNOWN JOINPOINT TYPE: " + invocation.getClass().getName());
/*     */   }
View Full Code Here

/*      */   public Object invokeNew(Object[] args, int idx)
/*      */     throws Throwable
/*      */   {
/* 1595 */     Interceptor[] cInterceptors = this.constructorInfos[idx].getInterceptors();
/* 1596 */     if (cInterceptors == null) cInterceptors = new Interceptor[0];
/* 1597 */     ConstructorInvocation invocation = new ConstructorInvocation(cInterceptors);
/*      */
/* 1599 */     invocation.setAdvisor(this);
/* 1600 */     invocation.setArguments(args);
/* 1601 */     invocation.setConstructor(this.constructors[idx]);
/* 1602 */     return invocation.invokeNext();
/*      */   }
View Full Code Here

/* 1680 */       return invokeWithoutAdvisement(methodInvocation.getTargetObject(), methodInvocation.getMethodHash(), methodInvocation.getArguments());
/*      */     }
/*      */
/* 1684 */     if ((invocation instanceof ConstructorInvocation))
/*      */     {
/* 1686 */       ConstructorInvocation cInvocation = (ConstructorInvocation)invocation;
/* 1687 */       Object[] arguments = cInvocation.getArguments();
/* 1688 */       Constructor constructor = cInvocation.getConstructor();
/* 1689 */       return invokeNewWithoutAdvisement(arguments, constructor);
/*      */     }
/* 1691 */     throw new IllegalStateException("Unknown Invocation type: " + invocation.getClass().getName());
/*      */   }
View Full Code Here

/*      */       catch (InvocationTargetException e)
/*      */       {
/*  713 */         throw new RuntimeException(e);
/*      */       }
/*      */     }
/*  716 */     ConstructorInvocation invocation = new ConstructorInvocation(cInterceptors);
/*      */
/*  719 */     invocation.setAdvisor(this);
/*  720 */     invocation.setConstructor(this.constructors[this.defaultConstructorIndex]);
/*      */     try
/*      */     {
/*  723 */       return invocation.invokeNext();
/*      */     }
/*      */     catch (Throwable throwable) {
/*      */     }
/*  727 */     throw new RuntimeException(throwable);
/*      */   }
View Full Code Here

   public Object invokeNew(Object[] args, int idx) throws Throwable
   {
      Interceptor[] cInterceptors = constructorInfos[idx].getInterceptors();
      if (cInterceptors == null) cInterceptors = new Interceptor[0];
      ConstructorInvocation invocation = new ConstructorInvocation(cInterceptors);

      invocation.setAdvisor(this);
      invocation.setArguments(args);
      invocation.setConstructor(constructors[idx]);
      return invocation.invokeNext();
   }
View Full Code Here

         methodInvocation.getMethodHash(),
         methodInvocation.getArguments());
      }
      else if (invocation instanceof ConstructorInvocation)
      {
         ConstructorInvocation cInvocation = (ConstructorInvocation) invocation;
         Object[] arguments = cInvocation.getArguments();
         Constructor constructor = cInvocation.getConstructor();
         return invokeNewWithoutAdvisement(arguments, constructor);
      }
      throw new IllegalStateException("Unknown Invocation type: " + invocation.getClass().getName());
   }
View Full Code Here

   public Object invokeNew(Object[] args, int idx) throws Throwable
   {
      Interceptor[] cInterceptors = constructorInfos[idx].getInterceptors();
      if (cInterceptors == null) cInterceptors = new Interceptor[0];
      ConstructorInvocation invocation = new ConstructorInvocation(cInterceptors);

      invocation.setAdvisor(this);
      invocation.setArguments(args);
      invocation.setConstructor(constructors[idx]);
      return invocation.invokeNext();
   }
View Full Code Here

         methodInvocation.getMethodHash(),
         methodInvocation.getArguments());
      }
      else if (invocation instanceof ConstructorInvocation)
      {
         ConstructorInvocation cInvocation = (ConstructorInvocation) invocation;
         Object[] arguments = cInvocation.getArguments();
         Constructor<?> constructor = cInvocation.getConstructor();
         return invokeNewWithoutAdvisement(arguments, constructor);
      }
      throw new IllegalStateException("Unknown Invocation type: " + invocation.getClass().getName());
   }
View Full Code Here

TOP

Related Classes of org.jboss.aop.joinpoint.ConstructorInvocation

Copyright © 2018 www.massapicom. 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.