Package org.jboss.aop

Examples of org.jboss.aop.ClassAdvisor$ResolveCallerMethodInfoAction


            {
               continue;
            }
            // Only need a temporary advisor for resolving metadata
            CtClass ctRef = null;
            ClassAdvisor advisor = null;
            if (ref.equals(clazz.getName()))
            {
               ctRef = clazz;
               advisor = clazzAdvisor;
            }
View Full Code Here


            }
            if (!isTransformable(ctRef)) continue;
           
            it.addSuperClass(ctRef);
           
            ClassAdvisor advisor = manager.getTempClassAdvisor(ctRef);
           
           
            if (!manager.getInterceptionMarkers().shouldSkipFieldAccess(ref) && !ref.equals(clazz.getName()))
            {
               List fields = getAdvisableFields(ctRef);
View Full Code Here

            {
               continue;
            }
            // Only need a temporary advisor for resolving metadata
            CtClass ctRef = null;
            ClassAdvisor advisor = null;
            if (ref.equals(clazz.getName()))
            {
               ctRef = clazz;
               advisor = clazzAdvisor;
            }
View Full Code Here

      {
         Map.Entry<String, Advisor> entry = it2.next();
         String classname = entry.getKey();
         indenter(pw, indent);
         pw.println("<class name=\"" + classname + "\">");
         ClassAdvisor advisor = (ClassAdvisor) entry.getValue();
         outputAdvisor(indent + 1, pw, advisor, classname);
         indenter(pw, indent);
         pw.println("</class>");
      }
   }
View Full Code Here

            }
         }
         else if (joinpoint instanceof FieldJoinpoint)
         {
            FieldJoinpoint field = (FieldJoinpoint) joinpoint;
            ClassAdvisor classAdvisor = (ClassAdvisor) advisor;
            instance = classAdvisor.getFieldAspect(field, aspect);
         }
         else
         {
            instance = aspect.getFactory().createPerJoinpoint(advisor, joinpoint);  
         }
View Full Code Here

      else if (joinpoint instanceof FieldJoinpoint)
      {
         FieldJoinpoint field = (FieldJoinpoint) joinpoint;
         if (Modifier.isStatic(field.getField().getModifiers()))
         {
            ClassAdvisor classAdvisor = (ClassAdvisor) advisor;
            Object aspect = classAdvisor.getFieldAspect(field, def);
            return PerVmAdvice.generateInterceptor(joinpoint, aspect, adviceName);
         }
      }
      return new PerJoinpointAdvice(adviceName, def, advisor, joinpoint);
   }
View Full Code Here

      return invocation.invokeNext();
   }

   private Method[] interceptGetDeclaredMethods(Class<?> clazz)
   {
      ClassAdvisor advisor = AspectManager.instance().getAdvisorIfAdvised(clazz);

      if (advisor == null)
      {
         return getDeclaredMethods(clazz);
      }
      else
      {
         Object[] advisedMethods = advisor.getAdvisedMethods().getValues();

         ArrayList<Method> methods = new ArrayList<Method>(advisedMethods.length);

         for (int i = 0; i < advisedMethods.length; i++)
         {
View Full Code Here

   }

   private Method interceptGetDeclaredMethod(Class<?> clazz, Object[] args) throws NoSuchMethodException
   {

      ClassAdvisor advisor = AspectManager.instance().getAdvisorIfAdvised(clazz);
      Method method = getDeclaredMethod(clazz, (String) args[0], (Class[]) args[1]);

      if (advisor == null)
      {
         return method;
      }
      else
      {
         Object[] advisedMethods = advisor.getAdvisedMethods().getValues();

         for (int i = 0; i < advisedMethods.length; i++)
         {
            Method m = (Method) advisedMethods[i];
            if (m.equals(method) && ReflectUtils.isNotAccessMethod(m) && isNotJavassistWrappedMethod(m))
View Full Code Here

      //implementations of overrriden methods
      GetMethodsAlreadyFound methodsFound = new GetMethodsAlreadyFound();

      while (clazz != null)
      {
         ClassAdvisor advisor = AspectManager.instance().getAdvisorIfAdvised(clazz);
         Object[] foundMethods;

         if (advisor == null)
         {
            foundMethods = getDeclaredMethods(clazz);
         }
         else
         {
            foundMethods = advisor.getAdvisedMethods().getValues();
         }

         for (int i = 0; i < foundMethods.length; i++)
         {
            Method m = (Method) foundMethods[i];
View Full Code Here

      while (clazz != null)
      {
         //Go up the inheritance hierachy looking for the class that declares this method
         if (clazz.equals(declaringClass))
         {
            ClassAdvisor advisor = AspectManager.instance().getAdvisorIfAdvised(clazz);

            if (advisor == null)
            {
               return method;
            }
            else
            {
               Object[] methods = advisor.getAdvisedMethods().getValues();

               for (int i = 0; i < methods.length; i++)
               {
                  Method m = (Method) methods[i];
                  if (m.equals(method))
View Full Code Here

TOP

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

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.