Package org.jboss.aop

Examples of org.jboss.aop.ClassAdvisor$ResolveConstructorCallerMethodInfoAction


/*  67 */       if (astCon.getClazz().isSimple())
/*     */       {
/*  69 */         if (!astCon.getClazz().matches(this.call.getClassName())) return Boolean.FALSE;
/*     */       }
/*  71 */       CtConstructor calledCon = this.call.getConstructor();
/*  72 */       ClassAdvisor calledAdvisor = AspectManager.instance().getTempClassAdvisor(calledCon.getDeclaringClass());
/*  73 */       ConstructorMatcher conMatcher = new ConstructorMatcher(calledAdvisor, calledCon, null);
/*  74 */       return conMatcher.matches(astCon);
/*     */     }
/*     */     catch (Exception e) {
/*     */     }
View Full Code Here


/*     */     {
/* 132 */       Map.Entry entry = (Map.Entry)it.next();
/* 133 */       String classname = (String)entry.getKey();
/* 134 */       indenter(pw, indent);
/* 135 */       pw.println("<class name=\"" + classname + "\">");
/* 136 */       ClassAdvisor advisor = (ClassAdvisor)entry.getValue();
/* 137 */       outputAdvisor(indent + 1, pw, advisor, classname);
/* 138 */       indenter(pw, indent);
/* 139 */       pw.println("</class>");
/*     */     }
/*     */   }
View Full Code Here

/*     */         }
/*     */       }
/* 153 */       else if ((joinpoint instanceof FieldJoinpoint))
/*     */       {
/* 155 */         FieldJoinpoint field = (FieldJoinpoint)joinpoint;
/* 156 */         ClassAdvisor classAdvisor = (ClassAdvisor)advisor;
/* 157 */         instance = classAdvisor.getFieldAspect(field, this.aspect);
/*     */       }
/*     */       else
/*     */       {
/* 161 */         instance = this.aspect.getFactory().createPerJoinpoint(advisor, joinpoint);
/*     */       }
View Full Code Here

/*  81 */       else if ((joinpoint instanceof FieldJoinpoint))
/*     */       {
/*  83 */         FieldJoinpoint field = (FieldJoinpoint)joinpoint;
/*  84 */         if (Modifier.isStatic(field.getField().getModifiers()))
/*     */         {
/*  86 */           ClassAdvisor classAdvisor = (ClassAdvisor)advisor;
/*  87 */           Object aspect = classAdvisor.getFieldAspect(field, def);
/*  88 */           return PerVmAdvice.generateInterceptor(joinpoint, aspect, adviceName);
/*     */         }
/*     */       }
/*     */     }
/*  91 */     return new PerJoinpointAdvice(adviceName, def, advisor, joinpoint);
View Full Code Here

/*  857 */     return invocation.invokeNext();
/*      */   }
/*      */
/*      */   private Method[] interceptGetDeclaredMethods(Class clazz)
/*      */   {
/*  862 */     ClassAdvisor advisor = AspectManager.instance().getAdvisorIfAdvised(clazz);
/*      */
/*  864 */     if (advisor == null)
/*      */     {
/*  866 */       return getDeclaredMethods(clazz);
/*      */     }
/*      */
/*  870 */     Object[] advisedMethods = advisor.getAdvisedMethods().getValues();
/*      */
/*  872 */     ArrayList methods = new ArrayList(advisedMethods.length);
/*      */
/*  874 */     for (int i = 0; i < advisedMethods.length; i++)
/*      */     {
View Full Code Here

/*      */   }
/*      */
/*      */   private Method interceptGetDeclaredMethod(Class clazz, Object[] args)
/*      */     throws NoSuchMethodException
/*      */   {
/*  890 */     ClassAdvisor advisor = AspectManager.instance().getAdvisorIfAdvised(clazz);
/*  891 */     Method method = getDeclaredMethod(clazz, (String)args[0], (Class[])(Class[])args[1]);
/*      */
/*  893 */     if (advisor == null)
/*      */     {
/*  895 */       return method;
/*      */     }
/*      */
/*  899 */     Object[] advisedMethods = advisor.getAdvisedMethods().getValues();
/*      */
/*  901 */     for (int i = 0; i < advisedMethods.length; i++)
/*      */     {
/*  903 */       Method m = (Method)advisedMethods[i];
/*  904 */       if ((m.equals(method)) && (isNotAccessMethod(m)) && (isNotJavassistWrappedMethod(m)))
View Full Code Here

/*      */
/*  959 */     GetMethodsAlreadyFound methodsFound = new GetMethodsAlreadyFound();
/*      */
/*  961 */     while (clazz != null)
/*      */     {
/*  963 */       ClassAdvisor advisor = AspectManager.instance().getAdvisorIfAdvised(clazz);
/*      */       Object[] foundMethods;
/*      */       Object[] foundMethods;
/*  966 */       if (advisor == null)
/*      */       {
/*  968 */         foundMethods = getDeclaredMethods(clazz);
/*      */       }
/*      */       else
/*      */       {
/*  972 */         foundMethods = advisor.getAdvisedMethods().getValues();
/*      */       }
/*      */
/*  975 */       for (int i = 0; i < foundMethods.length; i++)
/*      */       {
/*  977 */         Method m = (Method)foundMethods[i];
View Full Code Here

/*      */
/* 1000 */     while (clazz != null)
/*      */     {
/* 1003 */       if (clazz.equals(declaringClass))
/*      */       {
/* 1005 */         ClassAdvisor advisor = AspectManager.instance().getAdvisorIfAdvised(clazz);
/*      */
/* 1007 */         if (advisor == null)
/*      */         {
/* 1009 */           return method;
/*      */         }
/*      */
/* 1013 */         Object[] methods = advisor.getAdvisedMethods().getValues();
/*      */
/* 1015 */         for (int i = 0; i < methods.length; i++)
/*      */         {
/* 1017 */           Method m = (Method)methods[i];
/* 1018 */           if (m.equals(method))
View Full Code Here

/* 1029 */     throw new NoSuchMethodException();
/*      */   }
/*      */
/*      */   private Field[] interceptGetDeclaredFields(Class clazz)
/*      */   {
/* 1035 */     ClassAdvisor advisor = AspectManager.instance().getAdvisorIfAdvised(clazz);
/*      */
/* 1037 */     if (advisor == null)
/*      */     {
/* 1039 */       return getDeclaredFields(clazz);
/*      */     }
/*      */
/* 1043 */     Field[] advisedFields = advisor.getAdvisedFields();
/*      */
/* 1045 */     ArrayList fields = new ArrayList(advisedFields.length);
/*      */
/* 1047 */     for (int i = 0; i < advisedFields.length; i++)
/*      */     {
View Full Code Here

/*      */   }
/*      */
/*      */   private Field interceptGetDeclaredField(Class clazz, Object[] args)
/*      */     throws NoSuchFieldException
/*      */   {
/* 1132 */     ClassAdvisor advisor = AspectManager.instance().getAdvisorIfAdvised(clazz);
/* 1133 */     Field field = getDeclaredField(clazz, (String)args[0]);
/*      */
/* 1135 */     if (advisor == null)
/*      */     {
/* 1137 */       return field;
/*      */     }
/*      */
/* 1141 */     Field[] advisedFields = advisor.getAdvisedFields();
/*      */
/* 1143 */     for (int i = 0; i < advisedFields.length; i++)
/*      */     {
/* 1145 */       Field f = advisedFields[i];
/* 1146 */       if (f.equals(field))
View Full Code Here

TOP

Related Classes of org.jboss.aop.ClassAdvisor$ResolveConstructorCallerMethodInfoAction

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.