Package org.jboss.aop.advice

Examples of org.jboss.aop.advice.AdviceMethodProperties


/*     */   }
/*     */
/*     */   protected AdviceMethodProperties getAdviceMethodProperties(JoinPointBean joinPoint, JoinPointGenerator.AdviceSetup setup)
/*     */   {
/* 117 */     Constructor ctor = ((ConstructorExecution)joinPoint).getConstructor();
/* 118 */     return new AdviceMethodProperties(joinPoint, setup.getAspectClass(), setup.getAdviceName(), JOINPOINT_TYPE, INVOCATION_TYPE, ctor.getDeclaringClass(), ctor.getGenericParameterTypes(), ctor.getParameterTypes(), ctor.getGenericExceptionTypes(), ctor.getDeclaringClass(), false);
/*     */   }
View Full Code Here


/*      */     }
/*      */
/*      */     public boolean appendAdviceCall(JoinPointGenerator.AdviceSetup setup, String key, StringBuffer beforeCall, StringBuffer call, JoinPointGenerator generator, JoinPointInfo info)
/*      */       throws NotFoundException
/*      */     {
/* 2000 */       AdviceMethodProperties properties = setup.getAdviceMethodProperties();
/* 2001 */       if ((properties != null) && (!properties.isAdviceVoid()))
/*      */       {
/* 2003 */         call.append(key);
/*      */       }
/* 2005 */       return JoinPointGenerator.AdviceCallStrategy.access$700(this, setup, beforeCall, call, generator);
/*      */     }
View Full Code Here

/* 1856 */         return false;
/*      */       }
/*      */
/* 1859 */       boolean result = false;
/*      */
/* 1861 */       AdviceMethodProperties properties = setup.getAdviceMethodProperties();
/* 1862 */       if ((properties == null) || (properties.getAdviceMethod() == null))
/*      */       {
/* 1866 */         return false;
/*      */       }
/*      */
/* 1869 */       beforeCall.append("      case ");
View Full Code Here

/*      */     protected abstract String generateKey(JoinPointGenerator paramJoinPointGenerator);
/*      */
/*      */     protected abstract boolean appendAdviceCall(JoinPointGenerator.AdviceSetup paramAdviceSetup, String paramString, StringBuffer paramStringBuffer1, StringBuffer paramStringBuffer2, JoinPointGenerator paramJoinPointGenerator, JoinPointInfo paramJoinPointInfo) throws NotFoundException;
/*      */
/*      */     private final boolean appendAdviceCall(JoinPointGenerator.AdviceSetup setup, StringBuffer beforeCall, StringBuffer call, JoinPointGenerator generator) {
/* 1708 */       AdviceMethodProperties properties = setup.getAdviceMethodProperties();
/* 1709 */       if (properties == null)
/*      */       {
/* 1711 */         return false;
/*      */       }
/* 1713 */       call.append(setup.getAspectFieldName());
/* 1714 */       call.append(".");
/* 1715 */       call.append(setup.getAdviceName());
/* 1716 */       call.append("(");
/*      */
/* 1718 */       int[] args = properties.getArgs();
/* 1719 */       boolean argsFound = false;
/* 1720 */       if (args.length > 0)
/*      */       {
/* 1722 */         Class[] adviceParams = properties.getAdviceMethod().getParameterTypes();
/* 1723 */         if (properties.isAdviceOverloaded())
/*      */         {
/* 1725 */           appendCast(call, adviceParams[0]);
/*      */         }
/* 1727 */         argsFound = appendParameter(beforeCall, call, args[0], adviceParams[0], properties, generator);
/*      */
/* 1729 */         for (int i = 1; i < args.length; i++)
/*      */         {
/* 1731 */           call.append(", ");
/* 1732 */           if (properties.isAdviceOverloaded())
/*      */           {
/* 1734 */             appendCast(call, adviceParams[i]);
/*      */           }
/* 1736 */           argsFound = (appendParameter(beforeCall, call, args[i], adviceParams[i], properties, generator)) || (argsFound);
/*      */         }
View Full Code Here

/*      */       {
/* 1541 */         if (!allSetups[i].shouldInvokeAspect())
/*      */         {
/*      */           continue;
/*      */         }
/* 1545 */         AdviceMethodProperties properties = JoinPointGenerator.this.getAdviceMethodProperties(info, allSetups[i]);
/* 1546 */         AdviceType type = allSetups[i].getType();
/* 1547 */         int index = type.ordinal();
/* 1548 */         if (aspects[index] == null)
/*      */         {
/* 1550 */           aspects[index] = new ArrayList();
View Full Code Here

/*     */   }
/*     */
/*     */   protected AdviceMethodProperties getAdviceMethodProperties(JoinPointBean joinPoint, JoinPointGenerator.AdviceSetup setup)
/*     */   {
/* 134 */     Method method = ((MethodExecution)joinPoint).getMethod();
/* 135 */     return new AdviceMethodProperties(joinPoint, setup.getAspectClass(), setup.getAdviceName(), JOINPOINT_TYPE, INVOCATION_TYPE, method.getGenericReturnType(), method.getGenericParameterTypes(), method.getParameterTypes(), method.getGenericExceptionTypes(), method.getDeclaringClass(), hasTargetObject());
/*     */   }
View Full Code Here

/*     */   }
/*     */
/*     */   protected AdviceMethodProperties getAdviceMethodProperties(JoinPointBean joinPoint, JoinPointGenerator.AdviceSetup setup)
/*     */   {
/* 135 */     Method method = ((MethodCallByConstructor)joinPoint).getMethod();
/* 136 */     return new AdviceMethodProperties(joinPoint, setup.getAspectClass(), setup.getAdviceName(), JOINPOINT_TYPE, INVOCATION_TYPE, method.getGenericReturnType(), method.getGenericParameterTypes(), method.getParameterTypes(), method.getGenericExceptionTypes(), method.getDeclaringClass(), hasTargetObject(), ((MethodCallByConstructor)joinPoint).getCallingClass(), hasCallingObject());
/*     */   }
View Full Code Here

/*     */
/*     */   protected AdviceMethodProperties getAdviceMethodProperties(JoinPointBean joinPoint, JoinPointGenerator.AdviceSetup setup)
/*     */   {
/* 133 */     ConstructorCallByMethod call = (ConstructorCallByMethod)joinPoint;
/* 134 */     Constructor ctor = call.getConstructor();
/* 135 */     AdviceMethodProperties properties = new AdviceMethodProperties(joinPoint, setup.getAspectClass(), setup.getAdviceName(), JOINPOINT_TYPE, INVOCATION_TYPE, ctor.getDeclaringClass(), ctor.getGenericParameterTypes(), ctor.getParameterTypes(), ctor.getGenericExceptionTypes(), call.getCalledClass(), false, call.getCallingClass(), hasCallingObject());
/*     */
/* 149 */     return properties;
/*     */   }
View Full Code Here

/*     */
/*     */   protected AdviceMethodProperties getAdviceMethodProperties(JoinPointBean joinPoint, JoinPointGenerator.AdviceSetup setup)
/*     */   {
/* 124 */     ConstructorCallByConstructor call = (ConstructorCallByConstructor)joinPoint;
/* 125 */     Constructor ctor = call.getConstructor();
/* 126 */     AdviceMethodProperties properties = new AdviceMethodProperties(joinPoint, setup.getAspectClass(), setup.getAdviceName(), JOINPOINT_TYPE, INVOCATION_TYPE, ctor.getDeclaringClass(), ctor.getGenericParameterTypes(), ctor.getParameterTypes(), ctor.getGenericExceptionTypes(), call.getCalledClass(), false, call.getCallingClass(), true);
/*     */
/* 139 */     return properties;
/*     */   }
View Full Code Here

   protected AdviceMethodProperties getAdviceMethodProperties(JoinPointBean joinPoint, AdviceSetup setup)
   {
      FieldAccess fieldAccess = (FieldAccess)joinPoint;
      Field field = fieldAccess.getField();
      return new AdviceMethodProperties(
            joinPoint,
            setup.getAspectClass(),
            setup.getAdviceName(),
            JOINPOINT_TYPE,
            (fieldAccess.isRead()) ? READ_INVOCATION_TYPE : WRITE_INVOCATION_TYPE,
View Full Code Here

TOP

Related Classes of org.jboss.aop.advice.AdviceMethodProperties

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.